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 listJun 6, 2025 09:39IhebIhebScore: 872,210Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 6, 2025 09:39871,698375,197,535346,681,0001,998,0002,473,984
2Jun 6, 2025 09:39871,785379,170,525348,714,00002,285,568
3Jun 6, 2025 09:39871,955368,546,620346,784,0001,998,0002,465,792
4Jun 6, 2025 09:39871,998374,534,520346,801,0001,998,0002,285,568
5Jun 6, 2025 09:39872,210370,544,670346,885,0001,999,0002,285,568
6Jun 6, 2025 09:39872,298370,585,465346,920,0001,999,0002,285,568
7Jun 6, 2025 09:39872,453373,088,562346,982,0001,999,0002,285,568
8Jun 6, 2025 09:39872,473372,698,391346,990,0001,999,0002,457,600
9Jun 6, 2025 09:39873,630381,267,126348,451,0001,001,0002,461,696