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 listJun 26, 2026 20:45A_ShamanA_ShamanScore: 1,043,595Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 26, 2026 20:461,033,957422,764,306367,589,00045,994,0002,117,632
2Jun 26, 2026 20:461,034,627422,892,537367,584,00046,267,0002,117,632
3Jun 26, 2026 20:461,039,190424,912,517368,116,00047,560,0002,117,632
4Jun 26, 2026 20:461,043,465426,553,413370,313,00047,073,0002,117,632
5Jun 26, 2026 20:461,043,595426,671,974370,452,00046,986,0002,117,632
6Jun 26, 2026 20:461,044,427426,856,631371,323,00046,448,0002,117,632
7Jun 26, 2026 20:461,045,837427,457,765372,126,00046,209,0002,117,632
8Jun 26, 2026 20:461,049,577428,906,405373,663,00046,168,0002,113,536
9Jun 26, 2026 20:461,051,437429,668,527373,891,00046,684,0002,117,632