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 listJul 7, 2026 20:55Victor MerckléVictor MerckléScore: 2,537Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 7, 2026 20:561,8828,509,091753,00002,117,632stderr
2Jul 7, 2026 20:562,4978,811,756999,00002,117,632stderr
3Jul 7, 2026 20:562,5158,759,5331,006,00002,117,632stderr
4Jul 7, 2026 20:562,5178,849,2851,007,00002,117,632stderr
5Jul 7, 2026 20:562,5378,807,2701,015,00002,117,632stderr
6Jul 7, 2026 20:562,6508,892,5741,060,00002,117,632stderr
7Jul 7, 2026 20:562,6608,865,1351,064,00002,117,632stderr
8Jul 7, 2026 20:562,7109,275,3581,084,00002,117,632stderr
9Jul 7, 2026 20:562,7908,919,2181,116,00002,117,632stderr