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 listAug 31, 2026 00:39Tomislav TunkovicTomislav TunkovicScore: 4,200Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 31, 2026 00:454,1059,766,9131,642,000053,248
2Aug 31, 2026 00:454,13010,860,31201,652,00053,248
3Aug 31, 2026 00:454,1309,868,39601,652,00053,248
4Aug 31, 2026 00:454,1529,659,63301,661,00053,248
5Aug 31, 2026 00:454,2009,888,88101,680,00053,248
6Aug 31, 2026 00:454,2509,917,62301,700,00053,248
7Aug 31, 2026 00:454,2529,904,85001,701,00053,248
8Aug 31, 2026 00:454,27510,455,87401,710,00053,248
9Aug 31, 2026 00:454,2829,892,08601,713,00053,248