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 listFeb 23, 2026 18:27satoru.netsatoru.netScore: 1,541,553Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 23, 2026 18:271,536,968642,437,560569,803,00044,984,0002,326,528
2Feb 23, 2026 18:271,540,665641,066,502570,247,00046,019,0002,482,176
3Feb 23, 2026 18:271,540,918648,130,414571,341,00045,026,0002,342,912
4Feb 23, 2026 18:271,541,233643,256,693571,530,00044,963,0002,551,808
5Feb 23, 2026 18:271,541,553638,510,887571,649,00044,972,0002,482,176
6Feb 23, 2026 18:271,542,148643,244,130571,870,00044,989,0002,490,368
7Feb 23, 2026 18:271,543,353642,034,584572,317,00045,024,0002,334,720
8Feb 23, 2026 18:271,543,905645,139,039573,522,00044,040,0002,457,600
9Feb 23, 2026 18:271,544,948649,619,744571,981,00045,998,0002,465,792