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 listMay 18, 2026 08:57M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 18, 2026 08:58015,761,9603,784,0001,046,0002,121,728expected "51", got "50 "
2May 18, 2026 08:58015,951,1163,730,0001,063,0002,121,728expected "53", got "50 "
3May 18, 2026 08:5811,76514,063,9993,632,0001,074,0002,121,728
4May 18, 2026 08:5812,12515,051,8953,805,0001,045,0002,121,728
5May 18, 2026 08:5812,19016,164,0063,826,0001,050,0002,121,728
6May 18, 2026 08:5812,21216,646,4583,824,0001,061,0002,121,728
7May 18, 2026 08:5812,23214,854,4593,832,0001,061,0002,121,728
8May 18, 2026 08:5812,25215,046,2343,844,0001,057,0002,121,728
9May 18, 2026 08:5812,29715,118,5773,847,0001,072,0002,121,728