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 18:57TudyMTudyMScore: 879,562Success
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 18:58878,970369,681,594350,587,0001,001,0002,490,368
2Apr 26, 2026 18:58879,060367,210,930349,627,0001,997,0002,498,560
3Apr 26, 2026 18:58879,182371,077,258349,675,0001,998,0002,494,464
4Apr 26, 2026 18:58879,362374,559,908349,747,0001,998,0002,494,464
5Apr 26, 2026 18:58879,562366,462,610349,826,0001,999,0002,482,176
6Apr 26, 2026 18:58879,640369,447,322349,857,0001,999,0002,498,560
7Apr 26, 2026 18:58879,817371,358,322351,927,00002,502,656
8Apr 26, 2026 18:58879,880372,010,756349,953,0001,999,0002,506,752
9Apr 26, 2026 18:58880,107368,511,129350,043,0002,000,0002,498,560