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:18TudyMTudyMScore: 168,652Success
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:19162,84286,465,35058,123,0007,014,0002,514,944
2Apr 26, 2026 21:19164,04584,764,26859,561,0006,057,0002,514,944
3Apr 26, 2026 21:19164,81784,203,12360,933,0004,994,0002,539,520
4Apr 26, 2026 21:19165,43585,947,58759,156,0007,018,0002,506,752
5Apr 26, 2026 21:19168,65284,898,65864,441,0003,020,0002,510,848
6Apr 26, 2026 21:19169,83587,843,33263,938,0003,996,0002,519,040
7Apr 26, 2026 21:19169,98091,674,00662,993,0004,999,0002,523,136
8Apr 26, 2026 21:19170,77288,582,25362,282,0006,027,0002,510,848
9Apr 26, 2026 21:19175,27593,853,04068,107,0002,003,0002,514,944