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 22, 2026 21:02M-RochatM-RochatScore: 20,805Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 22, 2026 21:0320,69518,032,0507,249,0001,029,0002,121,728
2May 22, 2026 21:0320,78517,911,7527,286,0001,028,0002,121,728
3May 22, 2026 21:0320,79018,436,6627,261,0001,055,0002,121,728
4May 22, 2026 21:0320,80018,623,6097,211,0001,109,0002,121,728
5May 22, 2026 21:0320,80518,922,6137,253,0001,069,0002,117,632
6May 22, 2026 21:0320,83517,722,2367,293,0001,041,0002,121,728
7May 22, 2026 21:0320,88519,575,7267,295,0001,059,0002,121,728
8May 22, 2026 21:0320,92718,121,9557,332,0001,039,0002,113,536
9May 22, 2026 21:0321,13220,667,1547,412,0001,041,0002,121,728