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 listApr 29, 2026 23:09Charles CabergsCharles CabergsScore: 92,957Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 29, 2026 23:1190,62557,469,07020,139,00016,111,0002,338,816
2Apr 29, 2026 23:1191,04056,860,09821,243,00015,173,0002,478,080
3Apr 29, 2026 23:1191,83556,571,68913,899,00022,835,0002,473,984
4Apr 29, 2026 23:1192,34751,828,72919,967,00016,972,0002,469,888
5Apr 29, 2026 23:1192,95754,229,40523,114,00014,069,0002,449,408
6Apr 29, 2026 23:1193,07258,367,33421,130,00016,099,0002,457,600
7Apr 29, 2026 23:1193,11560,077,55216,106,00021,140,0002,465,792
8Apr 29, 2026 23:1193,83556,998,14918,260,00019,274,0002,461,696
9Apr 29, 2026 23:1194,33053,941,84218,866,00018,866,0002,469,888