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 20, 2026 14:23Dominique GarmierDominique GarmierScore: 41,287Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 14:2426,66027,405,1089,598,0001,066,0002,494,464
2Apr 20, 2026 14:2433,99031,390,43212,551,0001,045,0002,490,368
3Apr 20, 2026 14:2434,90032,496,92411,966,0001,994,0002,490,368
4Apr 20, 2026 14:2440,62042,651,80014,217,0002,031,0002,494,464
5Apr 20, 2026 14:2441,28735,489,70515,483,0001,032,0002,494,464
6Apr 20, 2026 14:2447,94046,482,88617,158,0002,018,0002,494,464
7Apr 20, 2026 14:2448,50241,175,72717,359,0002,042,0002,494,464
8Apr 20, 2026 14:2448,95544,537,50218,552,0001,030,0002,498,560
9Apr 20, 2026 14:2449,89038,856,55117,961,0001,995,0002,506,752