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 20, 2026 17:58M-RochatM-RochatScore: 12,705Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2026 18:0112,58016,280,3953,743,0001,289,0002,121,728
2May 20, 2026 18:0112,61015,318,1173,742,0001,302,0002,121,728
3May 20, 2026 18:0112,64515,468,0913,756,0001,302,0002,121,728
4May 20, 2026 18:0112,67515,807,7633,773,0001,297,0002,121,728
5May 20, 2026 18:0112,70514,365,1863,827,0001,255,0002,121,728
6May 20, 2026 18:0112,73515,791,2103,824,0001,270,0002,121,728
7May 20, 2026 18:0112,87215,171,2713,874,0001,275,0002,121,728
8May 20, 2026 18:0113,09217,014,9593,852,0001,385,0002,121,728
9May 20, 2026 18:0113,13218,266,2953,918,0001,335,0002,121,728