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 9, 2026 19:14E SequeiraE SequeiraScore: 100,740Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:1589,05254,830,94131,318,0004,303,0002,498,560
2May 9, 2026 19:1590,66554,391,66132,089,0004,177,0002,510,848
3May 9, 2026 19:1594,68757,073,55333,297,0004,578,0002,494,464
4May 9, 2026 19:15100,02559,466,77935,677,0004,333,0002,506,752
5May 9, 2026 19:15100,74055,216,31635,756,0004,540,0002,506,752
6May 9, 2026 19:15100,93059,210,30435,813,0004,559,0002,502,656
7May 9, 2026 19:15121,12766,950,90144,147,0004,304,0002,486,272
8May 9, 2026 19:15128,62270,533,03846,798,0004,651,0002,502,656
9May 9, 2026 19:15137,10773,413,86650,033,0004,810,0002,502,656