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 listMar 9, 2026 02:34olliecrowolliecrowScore: 77,518Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 9, 2026 02:3477,24356,473,07929,901,000996,0002,277,376
2Mar 9, 2026 02:3477,27056,287,02729,911,000997,0002,277,376
3Mar 9, 2026 02:3477,36356,778,01929,947,000998,0002,260,992
4Mar 9, 2026 02:3477,42356,090,87428,971,0001,998,0002,535,424
5Mar 9, 2026 02:3477,51854,382,90929,007,0002,000,0002,277,376
6Mar 9, 2026 02:3477,75356,477,53229,095,0002,006,0002,277,376
7Mar 9, 2026 02:3477,75560,020,60828,093,0003,009,0002,269,184
8Mar 9, 2026 02:3478,39362,098,18329,334,0002,023,0002,277,376
9Mar 9, 2026 02:3478,43354,317,95229,349,0002,024,0002,273,280