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 listFeb 21, 2026 02:01olliecrowolliecrowScore: 375,813Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2026 02:01375,288174,796,891147,113,0003,002,0002,277,376
2Feb 21, 2026 02:01375,398181,465,465144,153,0006,006,0002,289,664
3Feb 21, 2026 02:01375,485178,045,582143,185,0007,009,0002,461,696
4Feb 21, 2026 02:01375,560179,995,823145,217,0005,007,0002,510,848
5Feb 21, 2026 02:01375,813177,213,040144,312,0006,013,0002,375,680
6Feb 21, 2026 02:01376,798181,272,485148,723,0001,996,0002,392,064
7Feb 21, 2026 02:01395,983186,565,047154,384,0004,009,0002,486,272
8Feb 21, 2026 02:01673,983296,949,625264,601,0004,992,0002,277,376
9Feb 21, 2026 02:01699,898307,009,736273,960,0005,999,0002,449,408