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 17, 2026 19:56Victor MerckléVictor MerckléScore: 6,002Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 19:573,76210,271,0831,505,00002,117,632
2May 17, 2026 19:574,02712,360,5681,611,00002,117,632
3May 17, 2026 19:574,13010,470,9301,652,00002,117,632
4May 17, 2026 19:575,85713,605,7882,343,00002,117,632
5May 17, 2026 19:576,00211,207,7372,401,00002,117,632
6May 17, 2026 19:576,30711,327,8772,523,00002,117,632
7May 17, 2026 19:576,40211,435,2282,561,00002,117,632
8May 17, 2026 19:576,40713,428,5242,563,00002,117,632
9May 17, 2026 19:576,42711,598,8432,571,00002,117,632