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 listNov 19, 2025 19:23Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:44C#_user104.80CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:44011,369,0962,570,00002,117,632expected "300", got "343 "
2Sep 5, 2026 10:44012,041,9162,436,00002,117,632expected "300", got "343 "
3Sep 5, 2026 10:44010,802,5202,436,00002,117,632expected "300", got "343 "
4Nov 19, 2025 19:274,08821,830,64801,635,0002,387,968
5Nov 19, 2025 19:274,12816,767,1211,651,00002,387,968
6Nov 19, 2025 19:274,14321,379,1691,657,00002,387,968
7Nov 19, 2025 19:274,14817,285,3431,659,00002,482,176
8Nov 19, 2025 19:234,30821,389,0971,723,00002,379,776
9Nov 19, 2025 19:274,31317,821,9431,725,00002,396,160
10Nov 19, 2025 19:234,40823,913,09601,763,0002,387,968
11Nov 19, 2025 19:234,44519,194,67701,778,0002,392,064
12Nov 19, 2025 19:234,47518,826,59301,790,0002,392,064
13Nov 19, 2025 19:274,51319,085,2611,805,00002,519,040
14Nov 19, 2025 19:234,53519,094,8411,814,00002,387,968
15Nov 19, 2025 19:234,77018,919,22501,908,0002,473,984
16Nov 19, 2025 19:274,77019,938,06001,908,0002,383,872
17Nov 19, 2025 19:234,79017,687,384958,000958,0002,392,064
18Nov 19, 2025 19:274,79514,698,063959,000959,0002,387,968
19Nov 19, 2025 19:234,80017,874,305960,000960,0002,383,872
20Nov 19, 2025 19:274,80023,140,361960,000960,0002,396,160
21Nov 19, 2025 19:234,83517,724,671967,000967,0002,392,064