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 listApr 22, 2026 15:40Dominique GarmierDominique GarmierScore: 47,482Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 15:4129,93028,679,9899,977,0001,995,0002,506,752
2Apr 22, 2026 15:4133,44231,485,65811,319,0002,058,0002,502,656
3Apr 22, 2026 15:4144,86741,732,48215,953,0001,994,0002,334,720
4Apr 22, 2026 15:4147,46036,431,76616,986,0001,998,0002,506,752
5Apr 22, 2026 15:4147,48238,801,78816,994,0001,999,0002,342,912
6Apr 22, 2026 15:4147,63736,427,65217,050,0002,005,0002,510,848
7Apr 22, 2026 15:4148,32237,710,36518,312,0001,017,0002,514,944
8Apr 22, 2026 15:4149,16736,285,93218,632,0001,035,0002,506,752
9Apr 22, 2026 15:4149,91040,030,19416,970,0002,994,0002,506,752