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 listApr 26, 2026 21:55TudyMTudyMScore: 99,087Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 21:5694,56757,425,36730,859,0006,968,0002,314,240
2Apr 26, 2026 21:5696,32560,277,74732,447,0006,083,0002,310,144
3Apr 26, 2026 21:5698,88558,734,24133,469,0006,085,0002,301,952
4Apr 26, 2026 21:5698,95751,821,36633,494,0006,089,0002,314,240
5Apr 26, 2026 21:5699,08757,422,29532,521,0007,114,0002,322,432
6Apr 26, 2026 21:56100,04757,776,09533,016,0007,003,0002,310,144
7Apr 26, 2026 21:56100,24257,614,86535,085,0005,012,0002,383,872
8Apr 26, 2026 21:56100,93054,079,32835,326,0005,046,0002,310,144
9Apr 26, 2026 21:56103,02063,712,37036,183,0005,025,0002,359,296