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 18, 2026 20:34Charles CabergsCharles CabergsScore: 329,228Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 18, 2026 20:34324,288156,288,55372,840,00056,875,0002,441,216
2Apr 18, 2026 20:34325,373162,415,17864,073,00066,076,0002,404,352
3Apr 18, 2026 20:34325,898154,588,70864,177,00066,182,0002,506,752
4Apr 18, 2026 20:34326,830160,455,93264,867,00065,865,0002,306,048
5Apr 18, 2026 20:34329,228169,595,75875,822,00055,869,0002,277,376
6Apr 18, 2026 20:34329,728163,525,56967,944,00063,947,0002,347,008
7Apr 18, 2026 20:34333,765156,026,45866,251,00067,255,0002,510,848
8Apr 18, 2026 20:34336,198168,653,50266,236,00068,243,0002,473,984
9Apr 18, 2026 20:34339,320167,312,37966,866,00068,862,0002,502,656