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 listAug 15, 2026 16:47Victor MerckléVictor MerckléScore: 4,760Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 15, 2026 16:494,48213,696,9121,793,00002,117,632stderr
2Aug 15, 2026 16:494,57712,921,7821,831,00002,117,632stderr
3Aug 15, 2026 16:494,63513,335,4551,854,00002,117,632stderr
4Aug 15, 2026 16:494,69013,796,8751,876,00002,117,632stderr
5Aug 15, 2026 16:494,76012,975,2591,904,00002,117,632stderr
6Aug 15, 2026 16:494,82213,803,7911,929,00002,117,632stderr
7Aug 15, 2026 16:494,91013,903,2651,964,00002,117,632stderr
8Aug 15, 2026 16:494,97713,006,8171,991,00002,117,632stderr
9Aug 15, 2026 16:495,02513,928,1102,010,00002,117,632stderr