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 listMar 12, 2026 03:26olliecrowolliecrowScore: 7,350Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 23, 2026 01:234,80318,529,5591,921,00002,363,392
2Mar 23, 2026 01:235,35517,823,0981,071,0001,071,0002,449,408
3Mar 12, 2026 03:266,88522,779,3221,377,0001,377,0002,367,488
4Mar 12, 2026 03:266,99023,380,0662,796,00002,359,296
5Mar 12, 2026 03:267,33019,152,3921,955,000977,0002,375,680
6Mar 12, 2026 03:267,34522,798,316979,0001,959,0002,363,392
7Mar 12, 2026 03:267,35021,115,425980,0001,960,0002,277,376
8Mar 12, 2026 03:267,56819,533,8182,018,0001,009,0002,359,296
9Mar 12, 2026 03:269,18521,531,8833,674,00002,363,392
10Mar 12, 2026 03:269,91326,734,9182,974,000991,0002,285,568
11Mar 23, 2026 01:2310,27324,887,2323,082,0001,027,0002,293,760
12Mar 12, 2026 03:2610,93024,355,3193,279,0001,093,0002,285,568