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:47TudyMTudyMScore: 99,912Success
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:4897,98060,785,77435,173,0004,019,0002,465,792
2Apr 26, 2026 21:4898,20056,534,98731,223,0008,057,0002,306,048
3Apr 26, 2026 21:4898,46261,035,43232,316,0007,069,0002,306,048
4Apr 26, 2026 21:4899,84559,720,41333,948,0005,990,0002,314,240
5Apr 26, 2026 21:4899,91255,011,23534,970,0004,995,0002,318,336
6Apr 26, 2026 21:4899,96556,867,33231,989,0007,997,0002,314,240
7Apr 26, 2026 21:48100,95557,688,16934,325,0006,057,0002,310,144
8Apr 26, 2026 21:48101,23555,658,40934,420,0006,074,0002,310,144
9Apr 26, 2026 21:48101,48562,030,68335,520,0005,074,0002,318,336