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:00olliecrowolliecrowScore: 30,295Success
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:0029,13829,256,89110,596,0001,059,0002,527,232
2Mar 9, 2026 03:0029,74833,275,1129,916,0001,983,0002,535,424
3Mar 9, 2026 03:0030,11528,610,85510,039,0002,007,0002,392,064
4Mar 9, 2026 03:0030,28831,766,05011,106,0001,009,0002,281,472
5Mar 9, 2026 03:0030,29529,022,31911,109,0001,009,0002,289,664
6Mar 9, 2026 03:0030,32027,661,87710,107,0002,021,0002,269,184
7Mar 9, 2026 03:0030,41333,542,51710,138,0002,027,0002,269,184
8Mar 9, 2026 03:0030,43031,423,1389,129,0003,043,0002,281,472
9Mar 9, 2026 03:0030,97333,478,60911,357,0001,032,0002,527,232