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 5, 2026 00:57olliecrowolliecrowScore: 7,317Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 5, 2026 01:016,76521,630,4922,706,00002,494,464
2May 5, 2026 01:016,92716,441,0712,771,00002,482,176
3May 5, 2026 01:016,97016,876,0282,788,00002,482,176
4May 5, 2026 01:017,10517,861,6232,842,00002,490,368
5May 5, 2026 01:017,31718,458,4712,927,00002,494,464
6May 5, 2026 01:018,13715,858,8583,255,00002,486,272
7May 5, 2026 01:0110,29718,407,9954,119,00002,494,464
8May 5, 2026 01:0111,44719,874,1564,579,00002,494,464
9May 5, 2026 01:0111,66519,467,7464,666,00002,490,368