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 19, 2026 04:01olliecrowolliecrowScore: 5,025Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Apr 20, 2026 12:36Keefe33.73RecheckSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 19, 2026 04:013,19317,288,1421,277,00002,469,888
2Apr 19, 2026 04:013,27318,838,3911,309,00002,535,424
3Apr 19, 2026 04:013,32515,601,1121,330,00002,473,984
4Apr 19, 2026 04:013,42817,249,8181,371,00002,527,232
5Apr 19, 2026 04:013,48817,266,7151,395,00002,478,080
6Apr 19, 2026 04:014,24022,476,3631,696,00002,473,984
7Apr 20, 2026 12:364,84223,428,17601,937,0002,437,120
8Apr 19, 2026 04:014,93522,259,100987,000987,0002,469,888
9Apr 20, 2026 12:365,02519,430,00502,010,0002,445,312
10Apr 19, 2026 04:015,06517,949,2181,013,0001,013,0002,457,600
11Apr 19, 2026 04:015,37521,420,9751,075,0001,075,0002,469,888
12Apr 20, 2026 12:366,02520,567,1981,205,0001,205,0002,506,752