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 listAug 1, 2026 03:27Warren FuWarren FuScore: 1,488,822Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2026 03:291,479,175617,629,381469,505,000122,165,00065,536
2Aug 1, 2026 03:291,480,930613,676,772469,400,000122,972,00069,632
3Aug 1, 2026 03:291,482,655626,006,976468,999,000124,063,00024,576
4Aug 1, 2026 03:291,488,762624,012,342470,561,000124,944,00049,152
5Aug 1, 2026 03:291,488,822621,510,005470,347,000125,182,00032,768
6Aug 1, 2026 03:291,488,885637,800,816470,811,000124,743,00069,632
7Aug 1, 2026 03:291,501,327638,315,993469,070,000131,461,00020,480
8Aug 1, 2026 03:291,503,885644,293,551470,334,000131,220,00020,480
9Aug 1, 2026 03:291,506,275634,066,182470,994,000131,516,00020,480