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 listDec 28, 2025 04:05Josu San MartinJosu San MartinScore: 825,495Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 28, 2025 04:05825,103351,395,710328,041,0002,000,0002,314,240
2Dec 28, 2025 04:05825,255352,570,602329,102,0001,000,0002,318,336
3Dec 28, 2025 04:05825,428353,855,511330,171,00002,289,664
4Dec 28, 2025 04:05825,465351,947,873330,186,00002,289,664
5Dec 28, 2025 04:05825,495355,353,339330,198,00002,318,336
6Dec 28, 2025 04:05825,530350,592,882329,212,0001,000,0002,289,664
7Dec 28, 2025 04:05825,583357,776,680329,233,0001,000,0002,322,432
8Dec 28, 2025 04:05825,658359,495,557330,263,00002,314,240
9Dec 28, 2025 04:05825,980357,286,452329,391,0001,001,0002,437,120