Largest Square Submatrix of all 1's C#_user

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 listMay 9, 2026 19:14E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:00C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:00051,496,72236,216,0004,191,0002,117,632expected "300", got "255 "
2Sep 5, 2026 11:00050,424,42236,269,0004,218,0002,117,632expected "300", got "255 "
3Sep 5, 2026 11:00050,634,08736,227,0004,334,0002,117,632expected "300", got "255 "
4May 9, 2026 19:1589,05254,830,94131,318,0004,303,0002,498,560
5May 9, 2026 19:1590,66554,391,66132,089,0004,177,0002,510,848
6May 9, 2026 19:1594,68757,073,55333,297,0004,578,0002,494,464
7May 9, 2026 19:15100,02559,466,77935,677,0004,333,0002,506,752
8May 9, 2026 19:15100,74055,216,31635,756,0004,540,0002,506,752
9May 9, 2026 19:15100,93059,210,30435,813,0004,559,0002,502,656
10May 9, 2026 19:15121,12766,950,90144,147,0004,304,0002,486,272
11May 9, 2026 19:15128,62270,533,03846,798,0004,651,0002,502,656
12May 9, 2026 19:15137,10773,413,86650,033,0004,810,0002,502,656