Largest Square Submatrix of all 1's NoSIMD_C#

Find the largest square submatrix consisting entirely of 1s as fast as possible.

Input

A 10,000 x 10,000 matrix of uint8 values (0 or 1) on STDIN.

0, 1, 0, 1, 1
0, 1, 1, 1, 1
0, 0, 1, 0, 0
1, 0, 1, 1, 0

Output

Print the side length of the largest all-ones square submatrix to STDOUT. The answer is guaranteed to be greater than 1.

For the example above, the output is:

2
Back to listMay 20, 2026 17:29M-RochatM-RochatScore: 499,877Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2026 17:30499,745209,952,669198,881,0001,017,0002,113,536
2May 20, 2026 17:30499,750210,992,894198,896,0001,004,0002,113,536
3May 20, 2026 17:30499,757211,005,380198,893,0001,010,0002,113,536
4May 20, 2026 17:30499,782209,143,973198,895,0001,018,0002,113,536
5May 20, 2026 17:30499,877209,205,405198,907,0001,044,0002,113,536
6May 20, 2026 17:30499,892209,215,855198,894,0001,063,0002,113,536
7May 20, 2026 17:30499,912209,229,526198,908,0001,057,0002,113,536
8May 20, 2026 17:30499,955209,563,847198,918,0001,064,0002,113,536
9May 20, 2026 17:30499,957209,277,054198,922,0001,061,0002,113,536