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 12:34izotoffizotoffScore: 2,147,850Success
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 12:342,142,605882,216,461813,040,00044,002,0002,330,624
2Nov 20, 2025 12:342,144,280883,052,676809,729,00047,983,0002,347,008
3Nov 20, 2025 12:342,145,500891,163,295802,187,00056,013,0002,400,256
4Nov 20, 2025 12:342,147,735881,992,085810,089,00049,005,0002,453,504
5Nov 20, 2025 12:342,147,850890,693,669807,132,00052,008,0002,330,624
6Nov 20, 2025 12:342,148,263885,325,806814,342,00044,963,0002,433,024
7Nov 20, 2025 12:342,148,268887,697,777811,346,00047,961,0002,322,432
8Nov 20, 2025 12:342,149,205882,537,739807,702,00051,980,0002,347,008
9Nov 20, 2025 12:342,149,463893,045,348825,794,00033,991,0002,351,104