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 27, 2026 06:11Charles CabergsCharles CabergsScore: 96,935Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 06:1294,19057,316,37525,457,00012,219,0002,531,328
2Apr 27, 2026 06:1295,63756,759,26920,134,00018,121,0002,523,136
3Apr 27, 2026 06:1296,63757,300,18221,362,00017,293,0002,514,944
4Apr 27, 2026 06:1296,73555,912,19423,420,00015,274,0002,514,944
5Apr 27, 2026 06:1296,93557,977,23220,878,00017,896,0002,519,040
6Apr 27, 2026 06:12103,18261,417,51621,140,00020,133,0002,514,944
7Apr 27, 2026 06:12103,37255,910,50524,204,00017,145,0002,514,944
8Apr 27, 2026 06:12103,99060,696,07919,276,00022,320,0002,363,392
9Apr 27, 2026 06:12104,39559,155,23621,873,00019,885,0002,519,040