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 16, 2026 13:43M-RochatM-RochatScore: 31,710Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 13:4429,45220,674,6999,428,0002,353,0002,113,536
2May 16, 2026 13:4430,96223,134,86210,137,0002,248,0002,117,632
3May 16, 2026 13:4431,47521,507,34810,304,0002,286,0002,113,536
4May 16, 2026 13:4431,50724,153,4039,433,0003,170,0002,113,536
5May 16, 2026 13:4431,71024,688,07810,380,0002,304,0002,113,536
6May 16, 2026 13:4431,91722,804,7139,565,0003,202,0002,113,536
7May 16, 2026 13:4431,98021,683,9079,570,0003,222,0002,113,536
8May 16, 2026 13:4432,22522,584,22910,548,0002,342,0002,113,536
9May 16, 2026 13:4432,68721,985,84310,897,0002,178,0002,113,536