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 listAug 18, 2025 06:31Andrey NikolaevAndrey NikolaevScore: 1,042,408Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 18, 2025 06:311,041,940443,097,991370,801,00045,975,0002,506,752
2Aug 18, 2025 06:311,042,025453,818,867370,831,00045,979,0002,396,160
3Aug 18, 2025 06:311,042,135442,282,169371,870,00044,984,0002,519,040
4Aug 18, 2025 06:311,042,268439,708,805370,918,00045,989,0002,519,040
5Aug 18, 2025 06:311,042,408439,982,260371,967,00044,996,0002,342,912
6Aug 18, 2025 06:311,043,485443,344,211371,351,00046,043,0002,347,008
7Aug 18, 2025 06:311,043,488445,067,017371,352,00046,043,0002,510,848
8Aug 18, 2025 06:311,043,560449,004,597371,378,00046,046,0002,375,680
9Aug 18, 2025 06:311,044,573444,955,808371,848,00045,981,0002,510,848