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 29, 2026 04:24Charles CabergsCharles CabergsScore: 92,975Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 29, 2026 04:2589,79752,179,48120,953,00014,966,0002,314,240
2Apr 29, 2026 04:2590,03058,067,82421,007,00015,005,0002,514,944
3Apr 29, 2026 04:2590,10254,660,75615,017,00021,024,0002,502,656
4Apr 29, 2026 04:2591,35255,947,31519,286,00017,255,0002,519,040
5Apr 29, 2026 04:2592,97559,181,07416,082,00021,108,0002,519,040
6Apr 29, 2026 04:2594,15255,228,73522,795,00014,866,0002,519,040
7Apr 29, 2026 04:2595,97258,252,91121,215,00017,174,0002,514,944
8Apr 29, 2026 04:2596,80057,330,11917,322,00021,398,0002,523,136
9Apr 29, 2026 04:2597,65556,488,67522,035,00017,027,0002,519,040