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 19, 2025 17:08Chandrasekaran AkashChandrasekaran AkashScore: 8,999,638Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 19, 2025 17:088,751,8883,523,792,9583,451,773,00048,982,0002,523,136
2May 19, 2025 17:088,843,0653,562,282,7953,492,249,00044,977,0002,498,560
3May 19, 2025 17:088,902,5283,586,682,4663,515,037,00045,974,0002,277,376
4May 19, 2025 17:088,930,3603,595,976,2763,520,171,00051,973,0002,494,464
5May 19, 2025 17:088,999,6383,629,007,0433,540,891,00058,964,0002,482,176
6May 19, 2025 17:089,016,9983,635,226,9223,569,812,00036,987,0002,420,736
7May 19, 2025 17:089,143,8053,683,653,4753,595,548,00061,974,0002,445,312
8May 19, 2025 17:089,274,1653,738,335,5703,668,692,00040,974,0002,465,792
9May 19, 2025 17:089,394,3103,793,019,4273,705,742,00051,982,0002,461,696