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 listNov 20, 2025 20:29izotoffizotoffScore: 1,307,375Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2025 20:291,306,448549,790,511521,580,000999,0002,326,528
2Nov 20, 2025 20:291,306,643548,518,133520,659,0001,998,0002,392,064
3Nov 20, 2025 20:291,306,953549,296,024521,782,000999,0002,326,528
4Nov 20, 2025 20:291,307,050546,827,564520,821,0001,999,0002,326,528
5Nov 20, 2025 20:291,307,375545,679,835519,951,0002,999,0002,383,872
6Nov 20, 2025 20:291,308,443549,371,065523,377,00002,392,064
7Nov 20, 2025 20:291,308,763552,043,273520,508,0002,997,0002,326,528
8Nov 20, 2025 20:291,309,070551,706,397519,631,0003,997,0002,326,528
9Nov 20, 2025 20:291,309,668550,416,659523,867,00002,326,528