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 listJul 7, 2026 20:50Victor MerckléVictor MerckléScore: 2,512Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 7, 2026 20:511,7158,433,829686,00002,117,632stderr
2Jul 7, 2026 20:511,9528,572,880781,00002,117,632stderr
3Jul 7, 2026 20:512,1628,640,148865,00002,117,632stderr
4Jul 7, 2026 20:512,3328,711,048933,00002,117,632stderr
5Jul 7, 2026 20:512,5128,794,4361,005,00002,117,632stderr
6Jul 7, 2026 20:512,5358,819,0391,014,00002,117,632stderr
7Jul 7, 2026 20:512,5428,808,9751,017,00002,117,632stderr
8Jul 7, 2026 20:512,5458,833,5641,018,00002,117,632stderr
9Jul 7, 2026 20:512,6878,871,1851,075,00002,117,632stderr