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 12:35M-RochatM-RochatScore: 11,287Success
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 12:3611,17514,799,6983,336,0001,134,0002,121,728
2May 22, 2026 12:3611,22514,744,4463,417,0001,073,0002,121,728
3May 22, 2026 12:3611,24214,256,2343,439,0001,058,0002,121,728
4May 22, 2026 12:3611,27014,679,5853,449,0001,059,0002,121,728
5May 22, 2026 12:3611,28716,155,3403,463,0001,052,0002,121,728
6May 22, 2026 12:3611,31715,943,6743,466,0001,061,0002,121,728
7May 22, 2026 12:3611,39514,673,7983,474,0001,084,0002,121,728
8May 22, 2026 12:3611,45716,184,1163,518,0001,065,0002,121,728
9May 22, 2026 12:3611,52514,436,5283,530,0001,080,0002,121,728