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 16, 2026 19:01M-RochatM-RochatScore: 15,792Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 19:0315,54515,212,2164,976,0001,242,0002,121,728
2May 16, 2026 19:0315,73015,474,3714,182,0002,110,0002,121,728
3May 16, 2026 19:0315,74717,174,9864,199,0002,100,0002,121,728
4May 16, 2026 19:0315,77218,405,0965,049,0001,260,0002,121,728
5May 16, 2026 19:0315,79215,657,3784,196,0002,121,0002,121,728
6May 16, 2026 19:0315,83017,166,9134,221,0002,111,0002,121,728
7May 16, 2026 19:0315,86215,538,4295,079,0001,266,0002,121,728
8May 16, 2026 19:0315,92516,735,1524,239,0002,131,0002,121,728
9May 16, 2026 19:0316,05016,041,9694,249,0002,171,0002,121,728