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

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:36C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:36011,432,7921,553,00002,117,632expected "10000", got "255 "
2Sep 7, 2026 14:36011,329,9491,554,00002,117,632expected "10000", got "255 "
3Sep 7, 2026 14:36011,337,3861,550,00002,117,632expected "10000", got "255 "
4May 9, 2026 19:04143,80273,200,72156,440,0001,081,0002,367,488
5May 9, 2026 19:04149,63278,299,62658,738,0001,115,0002,375,680
6May 9, 2026 19:04149,97776,434,67458,929,0001,062,0002,375,680
7May 9, 2026 19:04151,74775,236,35859,655,0001,044,0002,371,584
8May 9, 2026 19:04153,13279,449,34760,163,0001,090,0002,375,680
9May 9, 2026 19:04162,39281,958,00463,846,0001,111,0002,371,584
10May 9, 2026 19:04172,33787,119,65667,860,0001,075,0002,383,872
11May 9, 2026 19:04203,015100,550,26980,113,0001,093,0002,379,776
12May 9, 2026 19:04230,987109,465,86891,281,0001,114,0002,375,680