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 6, 2026 14:53olliecrowolliecrowScore: 6,017Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 6, 2026 14:545,45019,984,5152,180,00002,465,792
2May 6, 2026 14:545,54719,983,0852,219,00002,461,696
3May 6, 2026 14:545,74220,501,2832,297,00002,469,888
4May 6, 2026 14:546,01018,246,5002,404,00002,461,696
5May 6, 2026 14:546,01717,759,8482,407,00002,461,696
6May 6, 2026 14:546,74215,967,5272,697,00002,453,504
7May 6, 2026 14:546,94217,961,0062,777,00002,465,792
8May 6, 2026 14:547,41016,535,5192,964,00002,461,696
9May 6, 2026 14:548,46721,355,6963,387,00002,473,984