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 23, 2026 22:04Andrew EpsteinAndrew EpsteinScore: 4,812Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 23, 2026 22:054,49511,486,7851,798,00002,117,632
2Aug 23, 2026 22:054,53211,480,2811,813,00002,117,632
3Aug 23, 2026 22:054,66011,468,3001,864,00002,117,632
4Aug 23, 2026 22:054,74211,479,0681,897,00002,117,632
5Aug 23, 2026 22:054,81211,583,0811,925,00002,117,632
6Aug 23, 2026 22:054,82511,396,8991,930,00002,117,632
7Aug 23, 2026 22:054,88011,598,2551,952,00002,117,632
8Aug 23, 2026 22:054,91011,575,1831,964,00002,117,632
9Aug 23, 2026 22:055,00011,656,0212,000,00002,117,632