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 27, 2026 19:28TudyMTudyMScore: 100,865Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 19:2998,45557,172,49132,314,0007,068,0002,314,240
2Apr 27, 2026 19:2999,15260,068,33332,543,0007,118,0002,314,240
3Apr 27, 2026 19:2999,93556,935,54733,978,0005,996,0002,379,776
4Apr 27, 2026 19:2999,97758,037,90033,993,0005,998,0002,310,144
5Apr 27, 2026 19:29100,86558,959,36535,303,0005,043,0002,310,144
6Apr 27, 2026 19:29101,81762,250,43934,618,0006,109,0002,310,144
7Apr 27, 2026 19:29102,29757,926,53834,931,0005,988,0002,318,336
8Apr 27, 2026 19:29102,41059,915,22331,972,0008,992,0002,310,144
9Apr 27, 2026 19:29104,21760,528,60734,570,0007,117,0002,306,048