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 listNov 19, 2025 18:52Yuriy LyfenkoYuriy LyfenkoScore: 8,745Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 19, 2025 18:516,74522,263,3762,698,00002,322,432
2Nov 19, 2025 18:516,80521,863,4551,361,0001,361,0002,326,528
3Nov 19, 2025 18:517,28315,682,212971,0001,942,0002,334,720
4Nov 19, 2025 18:527,32819,317,795977,0001,954,0002,330,624
5Nov 19, 2025 18:517,39819,622,5151,973,000986,0002,334,720
6Nov 19, 2025 18:518,68820,676,7202,317,0001,158,0002,334,720
7Nov 19, 2025 18:518,73820,088,9582,330,0001,165,0002,531,328
8Nov 19, 2025 18:528,74518,521,7363,498,00002,420,736
9Nov 19, 2025 18:528,74820,233,0562,333,0001,166,0002,330,624
10Nov 19, 2025 18:518,80823,114,5412,349,0001,174,0002,334,720
11Nov 19, 2025 18:528,81519,021,3153,526,00002,334,720
12Nov 19, 2025 18:518,85020,599,7092,360,0001,180,0002,531,328
13Nov 19, 2025 18:528,85022,092,4593,540,00002,322,432
14Nov 19, 2025 18:518,87327,236,4193,549,00002,531,328
15Nov 19, 2025 18:528,92018,702,7373,568,00002,330,624