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:27Dominique GarmierDominique GarmierScore: 47,210Success
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:2834,65741,437,52212,873,000990,0002,273,280
2Apr 20, 2026 14:2841,59243,411,96615,598,0001,039,0002,494,464
3Apr 20, 2026 14:2842,31233,593,54114,934,0001,991,0002,490,368
4Apr 20, 2026 14:2843,25044,401,41015,265,0002,035,0002,490,368
5Apr 20, 2026 14:2847,21051,031,60316,897,0001,987,0002,498,560
6Apr 20, 2026 14:2847,88045,573,97016,128,0003,024,0002,494,464
7Apr 20, 2026 14:2848,75241,259,88818,475,0001,026,0002,490,368
8Apr 20, 2026 14:2849,59536,523,58518,847,000991,0002,285,568
9Apr 20, 2026 14:2850,28244,447,32118,102,0002,011,0002,490,368