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 20:25Charles CabergsCharles CabergsScore: 91,692Success
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 20:2789,52056,154,87415,915,00019,893,0002,469,888stderr
2Apr 29, 2026 20:2790,18053,253,03820,040,00016,032,0002,543,616stderr
3Apr 29, 2026 20:2790,94251,212,65517,178,00019,199,0002,461,696stderr
4Apr 29, 2026 20:2791,45258,219,54520,323,00016,258,0002,457,600stderr
5Apr 29, 2026 20:2791,69254,211,92416,301,00020,376,0002,461,696stderr
6Apr 29, 2026 20:2792,23253,303,81215,954,00020,939,0002,457,600stderr
7Apr 29, 2026 20:2793,33756,474,96719,172,00018,163,0002,461,696stderr
8Apr 29, 2026 20:2798,77265,411,70422,287,00017,222,0002,469,888stderr
9Apr 29, 2026 20:27100,26254,621,28421,055,00019,050,0002,473,984stderr