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 21, 2026 05:02Charles CabergsCharles CabergsScore: 190,945Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 21, 2026 05:03189,622104,578,42735,928,00039,921,0002,256,896
2Apr 21, 2026 05:03190,547104,640,05235,101,00041,118,0002,256,896
3Apr 21, 2026 05:03190,660102,555,52836,125,00040,139,0002,248,704
4Apr 21, 2026 05:03190,755104,796,92235,139,00041,163,0002,256,896
5Apr 21, 2026 05:03190,945105,546,56535,174,00041,204,0002,260,992
6Apr 21, 2026 05:03191,295104,647,86331,211,00045,307,0002,256,896
7Apr 21, 2026 05:03191,335108,639,20238,267,00038,267,0002,252,800
8Apr 21, 2026 05:03191,532104,693,17642,339,00034,274,0002,256,896
9Apr 21, 2026 05:03191,865104,736,27546,845,00029,901,0002,252,800