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 27, 2026 19:42Victor MerckléVictor MerckléScore: 6,435Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 19:436,06017,492,3571,212,0001,212,0002,514,944
2Apr 27, 2026 19:436,10525,423,6001,221,0001,221,0002,510,848
3Apr 27, 2026 19:436,11518,736,4831,223,0001,223,0002,510,848
4Apr 27, 2026 19:436,12519,207,3341,225,0001,225,0002,523,136
5Apr 27, 2026 19:436,43521,820,7641,287,0001,287,0002,514,944
6Apr 27, 2026 19:438,08019,814,6292,155,0001,077,0002,514,944
7Apr 27, 2026 19:438,09517,476,3501,079,0002,159,0002,519,040
8Apr 27, 2026 19:438,27523,434,7832,207,0001,103,0002,519,040
9Apr 27, 2026 19:438,44720,563,9602,253,0001,126,0002,523,136