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 9, 2026 18:56Josu San MartinJosu San MartinScore: 8,020Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 18:586,8859,537,0852,754,00002,469,888
2May 9, 2026 18:587,1859,124,8862,874,00002,457,600
3May 9, 2026 18:587,3529,553,4432,941,00002,461,696
4May 9, 2026 18:587,4859,114,3492,994,00002,461,696
5May 9, 2026 18:588,0209,127,2313,208,00002,473,984
6May 9, 2026 18:588,20710,974,5553,283,00002,465,792
7May 9, 2026 18:588,41710,883,8323,367,00002,473,984
8May 9, 2026 18:588,48710,944,3903,395,00002,461,696
9May 9, 2026 18:589,1029,354,6331,255,0002,386,0002,469,888