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 21:41TudyMTudyMScore: 98,452Success
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 21:4394,54253,155,54630,851,0006,966,0002,310,144
2Apr 26, 2026 21:4395,01059,466,39932,004,0006,000,0002,318,336
3Apr 26, 2026 21:4396,08254,406,20532,365,0006,068,0002,318,336
4Apr 26, 2026 21:4397,89556,335,32132,130,0007,028,0002,306,048
5Apr 26, 2026 21:4398,45258,147,38933,323,0006,058,0002,330,624
6Apr 26, 2026 21:4399,59060,080,12735,751,0004,085,0002,318,336
7Apr 26, 2026 21:43100,97258,343,04234,331,0006,058,0002,355,200
8Apr 26, 2026 21:43101,61557,845,49232,517,0008,129,0002,330,624
9Apr 26, 2026 21:43103,41759,288,26734,305,0007,062,0002,326,528