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:35M-RochatM-RochatScore: 23,900Success
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:3623,38720,573,2858,328,0001,027,0002,121,728
2May 20, 2026 17:3623,56020,159,7108,364,0001,060,0002,117,632
3May 20, 2026 17:3623,69719,505,7258,448,0001,031,0002,117,632
4May 20, 2026 17:3623,73219,072,7758,358,0001,135,0002,121,728
5May 20, 2026 17:3623,90018,980,8898,446,0001,114,0002,121,728
6May 20, 2026 17:3624,04720,570,2908,564,0001,055,0002,113,536
7May 20, 2026 17:3624,11719,498,2938,610,0001,037,0002,117,632
8May 20, 2026 17:3624,13523,158,4038,537,0001,117,0002,113,536
9May 20, 2026 17:3624,44520,384,8298,718,0001,060,0002,113,536