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 18:11Aleksei ShahoikaAleksei ShahoikaScore: 33,500Success
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 18:1227,30732,308,7279,853,0001,070,0002,359,296
2May 9, 2026 18:1228,56226,997,78710,353,0001,072,0002,363,392
3May 9, 2026 18:1230,86226,240,33011,290,0001,055,0002,367,488
4May 9, 2026 18:1233,25231,815,08412,228,0001,073,0002,363,392
5May 9, 2026 18:1233,50027,548,77912,352,0001,048,0002,359,296
6May 9, 2026 18:1233,94028,380,55212,523,0001,053,0002,351,104
7May 9, 2026 18:1234,18529,283,10412,603,0001,071,0002,363,392
8May 9, 2026 18:1234,26731,040,50812,637,0001,070,0002,359,296
9May 9, 2026 18:1235,02229,692,12412,962,0001,047,0002,375,680