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 6, 2026 07:52olliecrowolliecrowScore: 4,762Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 6, 2026 07:534,01218,316,3051,605,00002,469,888
2May 6, 2026 07:534,02715,398,1691,611,00002,465,792
3May 6, 2026 07:534,04518,032,2621,618,00002,461,696
4May 6, 2026 07:534,43518,901,8461,774,00002,465,792
5May 6, 2026 07:534,76215,299,1451,905,00002,461,696
6May 6, 2026 07:536,06217,512,0932,425,00002,457,600
7May 6, 2026 07:536,28019,226,3702,512,00002,469,888
8May 6, 2026 07:536,29516,880,6872,518,00002,465,792
9May 6, 2026 07:536,93017,682,9092,772,00002,457,600