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 17:38Aleksei ShahoikaAleksei ShahoikaScore: 23,745Success
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 17:4022,39027,624,1237,890,0001,066,0002,355,200
2May 9, 2026 17:4023,04226,183,2098,144,0001,073,0002,363,392
3May 9, 2026 17:4023,29727,458,4098,249,0001,070,0002,375,680
4May 9, 2026 17:4023,70727,208,3928,421,0001,062,0002,367,488
5May 9, 2026 17:4023,74523,857,2458,419,0001,079,0002,367,488
6May 9, 2026 17:4023,83227,277,5268,452,0001,081,0002,355,200
7May 9, 2026 17:4023,92026,178,8948,509,0001,059,0002,367,488
8May 9, 2026 17:4024,15228,436,9668,562,0001,099,0002,359,296
9May 9, 2026 17:4024,25224,364,4358,639,0001,062,0002,367,488