Largest Square Submatrix of all 1's C#_user

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 listSep 5, 2026 09:51C#_userC#_userScore: 1,091,625Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 09:531,079,107441,785,268386,391,00045,252,0002,113,536
2Sep 5, 2026 09:531,081,272443,479,482386,989,00045,520,0002,113,536
3Sep 5, 2026 09:531,085,210444,247,202388,789,00045,295,0002,113,536
4Sep 5, 2026 09:531,090,190446,218,002390,730,00045,346,0002,113,536
5Sep 5, 2026 09:531,091,625447,093,714391,037,00045,613,0002,113,536
6Sep 5, 2026 09:531,094,120448,504,729392,590,00045,058,0002,113,536
7Sep 5, 2026 09:531,095,882448,507,260393,061,00045,292,0002,113,536
8Sep 5, 2026 09:531,096,347448,746,881392,895,00045,644,0002,113,536
9Sep 5, 2026 09:531,096,550449,579,046393,246,00045,374,0002,113,536