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 08:28Charles CabergsCharles CabergsScore: 109,485Success
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 08:29106,08059,672,00124,247,00018,185,0002,367,488stderr
2Apr 26, 2026 08:29108,21759,696,66722,147,00021,140,0002,375,680stderr
3Apr 26, 2026 08:29108,74556,267,09722,255,00021,243,0002,433,024stderr
4Apr 26, 2026 08:29109,24263,066,22121,340,00022,357,0002,359,296stderr
5Apr 26, 2026 08:29109,48566,728,11823,888,00019,906,0002,355,200stderr
6Apr 26, 2026 08:29109,95267,389,85325,989,00017,992,0002,359,296stderr
7Apr 26, 2026 08:29116,19065,467,19326,269,00020,207,0002,359,296stderr
8Apr 26, 2026 08:29116,81565,660,05728,442,00018,284,0002,367,488stderr
9Apr 26, 2026 08:29122,07262,738,32428,899,00019,930,0002,371,584stderr