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 17, 2026 13:41M-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 17, 2026 13:43011,523,891896,00002,117,632expected "65", got "50 "
2May 17, 2026 13:43012,377,593724,00002,117,632expected "78", got "50 "
3May 17, 2026 13:432,00011,521,103800,00002,117,632
4May 17, 2026 13:432,0009,302,072800,00002,117,632
5May 17, 2026 13:432,0179,352,461807,00002,117,632
6May 17, 2026 13:432,0179,293,675807,00002,117,632
7May 17, 2026 13:432,24210,997,946897,00002,117,632
8May 17, 2026 13:432,2809,969,018912,00002,117,632
9May 17, 2026 13:432,2879,811,574915,00002,117,632