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 02:41Charles CabergsCharles CabergsScore: 174,392Success
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 02:42172,88087,197,59935,077,00034,075,0002,301,952stderr
2Apr 26, 2026 02:42172,94287,797,97339,100,00030,077,0002,555,904stderr
3Apr 26, 2026 02:42173,76791,577,50739,287,00030,220,0002,519,040stderr
4Apr 26, 2026 02:42174,12088,128,40044,413,00025,235,0002,301,952stderr
5Apr 26, 2026 02:42174,39288,990,44936,872,00032,885,0002,314,240stderr
6Apr 26, 2026 02:42174,51789,358,01238,893,00030,914,0002,301,952stderr
7Apr 26, 2026 02:42174,95289,602,67341,989,00027,992,0002,301,952stderr
8Apr 26, 2026 02:42185,92793,729,40143,216,00031,155,0002,564,096stderr
9Apr 26, 2026 02:42188,41089,762,24738,184,00037,180,0002,396,160stderr