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 15, 2026 00:13zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 14:20M-Rochat107.65CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 14:56011,238,928898,00002,113,536expected "390", got "155 "
2May 17, 2026 14:56011,058,024905,00002,113,536expected "390", got "155 "
3May 17, 2026 14:5608,793,989953,00002,113,536expected "390", got "155 "
4May 15, 2026 00:141,7527,783,231701,00002,113,536
5May 15, 2026 00:141,9107,848,397764,00002,113,536
6May 15, 2026 00:141,9277,897,549771,00002,113,536
7May 15, 2026 00:142,1378,747,760855,00002,113,536
8May 15, 2026 00:142,2959,542,136918,00002,113,536
9May 15, 2026 00:142,31216,150,218925,00002,113,536
10May 15, 2026 00:142,36510,414,009946,00002,113,536
11May 15, 2026 00:142,37010,331,746948,00002,113,536
12May 15, 2026 00:142,5879,886,3061,035,00002,113,536