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 16, 2026 13:25Andrew TsibinAndrew TsibinScore: 3,267Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2026 13:262,98510,704,8931,194,00002,117,632
2Jul 16, 2026 13:263,03210,626,6811,213,00002,117,632
3Jul 16, 2026 13:263,06210,670,4271,225,00002,117,632
4Jul 16, 2026 13:263,20710,574,1991,283,00002,117,632
5Jul 16, 2026 13:263,26710,892,6341,307,00002,117,632
6Jul 16, 2026 13:263,35510,868,3311,342,00002,117,632
7Jul 16, 2026 13:263,36710,794,6551,347,00002,117,632
8Jul 16, 2026 13:263,42012,078,2711,368,00002,117,632
9Jul 16, 2026 13:263,47710,827,8291,391,00002,117,632