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:21E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:03C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:05048,588,42234,526,0004,124,0002,117,632expected "300", got "255 "
2Sep 5, 2026 11:05049,014,11034,560,0004,483,0002,117,632expected "300", got "255 "
3Sep 5, 2026 11:05048,539,66034,439,0004,198,0002,117,632expected "300", got "255 "
4May 9, 2026 19:2497,14056,655,97934,300,0004,556,0002,502,656
5May 9, 2026 19:2498,16058,177,05334,664,0004,600,0002,502,656
6May 9, 2026 19:24100,43557,974,18935,629,0004,545,0002,498,560
7May 9, 2026 19:24100,94258,608,05035,822,0004,555,0002,498,560
8May 9, 2026 19:24101,35758,914,28436,184,0004,359,0002,498,560
9May 9, 2026 19:24101,61259,084,57836,178,0004,467,0002,494,464
10May 9, 2026 19:24104,04259,693,76536,866,0004,751,0002,494,464
11May 9, 2026 19:24124,06568,714,49345,272,0004,354,0002,498,560
12May 9, 2026 19:24137,66572,506,05150,291,0004,775,0002,502,656