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 18, 2026 00:41M-RochatM-RochatScore: 17,392Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 18, 2026 00:4417,12218,268,5075,728,0001,121,0002,121,728
2May 18, 2026 00:4417,23518,322,2215,816,0001,078,0002,121,728
3May 18, 2026 00:4417,27017,308,4895,798,0001,110,0002,121,728
4May 18, 2026 00:4417,33017,293,2875,901,0001,031,0002,121,728
5May 18, 2026 00:4417,39217,714,4315,872,0001,085,0002,121,728
6May 18, 2026 00:4417,39516,987,8115,797,0001,161,0002,121,728
7May 18, 2026 00:4417,44216,238,6365,946,0001,031,0002,121,728
8May 18, 2026 00:4417,52518,746,4155,972,0001,038,0002,121,728
9May 18, 2026 00:4417,62516,735,9026,014,0001,036,0002,121,728