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 5, 2026 21:23olliecrowolliecrowScore: 415,460Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 5, 2026 21:23351,965166,052,150135,794,0004,992,0002,498,560
2Mar 5, 2026 21:23351,978171,083,497134,800,0005,991,0002,383,872
3Mar 5, 2026 21:23352,043170,942,655137,821,0002,996,0002,514,944
4Mar 5, 2026 21:23352,198166,998,059135,884,0004,995,0002,494,464
5Mar 5, 2026 21:23415,460192,569,070159,177,0007,007,0002,322,432
6Mar 5, 2026 21:23453,585214,684,834172,413,0009,021,0002,449,408
7Mar 5, 2026 21:23491,458221,995,654189,598,0006,985,0002,437,120
8Mar 5, 2026 21:23510,305232,281,917199,119,0005,003,0002,379,776
9Mar 5, 2026 21:23535,978243,041,435210,384,0004,007,0002,375,680