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 26, 2026 22:10Charles CabergsCharles CabergsScore: 1,224,142Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 22:121,220,572508,717,197465,219,00023,010,0002,535,424stderr
2Apr 26, 2026 22:121,220,862507,204,812469,332,00019,013,0002,539,520stderr
3Apr 26, 2026 22:121,221,200505,325,677465,505,00022,975,0002,531,328stderr
4Apr 26, 2026 22:121,221,705505,574,755472,693,00015,989,0002,334,720stderr
5Apr 26, 2026 22:121,224,142512,073,482469,671,00019,986,0002,347,008stderr
6Apr 26, 2026 22:121,224,900504,812,578471,962,00017,998,0002,531,328stderr
7Apr 26, 2026 22:121,225,567505,784,407476,221,00014,006,0002,383,872stderr
8Apr 26, 2026 22:121,227,897511,629,163472,153,00019,006,0002,543,616stderr
9Apr 26, 2026 22:121,230,177507,307,918469,068,00023,003,0002,531,328stderr