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 listMay 9, 2026 16:21Aleksei ShahoikaAleksei ShahoikaScore: 790,897Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 16:22790,792334,936,198315,298,0001,019,0002,523,136
2May 9, 2026 16:22790,870333,272,626315,276,0001,072,0002,510,848
3May 9, 2026 16:22790,877330,541,989315,325,0001,026,0002,514,944
4May 9, 2026 16:22790,885333,624,957315,296,0001,058,0002,506,752
5May 9, 2026 16:22790,897332,620,811315,308,0001,051,0002,510,848
6May 9, 2026 16:22791,090334,681,502315,432,0001,004,0002,510,848
7May 9, 2026 16:22791,112333,403,990315,414,0001,031,0002,498,560
8May 9, 2026 16:22791,172334,162,063315,327,0001,142,0002,523,136
9May 9, 2026 16:22791,255333,356,249315,453,0001,049,0002,490,368