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:18M-RochatM-RochatScore: 11,592Success
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:2010,86216,080,2273,250,0001,095,0002,121,728
2May 22, 2026 21:2011,27516,490,3993,432,0001,078,0002,121,728
3May 22, 2026 21:2011,45714,950,9023,518,0001,065,0002,121,728
4May 22, 2026 21:2011,48215,465,8833,542,0001,051,0002,121,728
5May 22, 2026 21:2011,59219,832,6723,577,0001,060,0002,121,728
6May 22, 2026 21:2011,59714,672,9153,515,0001,124,0002,121,728
7May 22, 2026 21:2011,61514,479,5953,560,0001,086,0002,121,728
8May 22, 2026 21:2011,64715,292,1503,598,0001,061,0002,121,728
9May 22, 2026 21:2011,69014,527,6643,620,0001,056,0002,121,728