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 26, 2026 21:24TudyMTudyMScore: 99,677Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 21:2591,79052,092,92528,557,0008,159,0002,506,752
2Apr 26, 2026 21:2592,84054,036,00232,118,0005,018,0002,519,040
3Apr 26, 2026 21:2593,27255,942,67232,268,0005,041,0002,473,984
4Apr 26, 2026 21:2599,33057,744,75432,779,0006,953,0002,506,752
5Apr 26, 2026 21:2599,67759,257,67732,894,0006,977,0002,510,848
6Apr 26, 2026 21:25100,66057,017,81335,231,0005,033,0002,510,848
7Apr 26, 2026 21:25100,80764,303,62034,275,0006,048,0002,510,848
8Apr 26, 2026 21:25102,16558,521,28233,889,0006,977,0002,506,752
9Apr 26, 2026 21:25104,90559,784,70834,969,0006,993,0002,523,136