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 listMar 9, 2026 03:06olliecrowolliecrowScore: 24,743Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 9, 2026 03:0622,99827,612,4227,155,0002,044,0002,277,376
2Mar 9, 2026 03:0623,21529,103,2888,255,0001,031,0002,514,944
3Mar 9, 2026 03:0623,47329,393,1208,346,0001,043,0002,269,184
4Mar 9, 2026 03:0624,30829,001,5368,643,0001,080,0002,277,376
5Mar 9, 2026 03:0624,74325,419,9027,918,0001,979,0002,277,376
6Mar 9, 2026 03:0624,76527,189,1338,916,000990,0002,281,472
7Mar 9, 2026 03:0624,76827,272,2977,926,0001,981,0002,277,376
8Mar 9, 2026 03:0624,78829,967,0448,924,000991,0002,281,472
9Mar 9, 2026 03:0624,86325,982,3838,951,000994,0002,277,376