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 21, 2026 06:54Charles CabergsCharles CabergsScore: 201,395Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 21, 2026 06:55197,570108,286,29137,013,00042,015,0002,260,992stderr
2Apr 21, 2026 06:55198,660105,513,62438,223,00041,241,0002,256,896stderr
3Apr 21, 2026 06:55199,467108,556,20338,896,00040,891,0002,506,752stderr
4Apr 21, 2026 06:55200,642106,604,97841,132,00039,125,0002,252,800stderr
5Apr 21, 2026 06:55201,39597,644,26145,314,00035,244,0002,310,144stderr
6Apr 21, 2026 06:55201,700108,422,63440,838,00039,842,0002,265,088stderr
7Apr 21, 2026 06:55215,950117,606,30041,181,00045,199,0002,347,008stderr
8Apr 21, 2026 06:55216,742113,602,45539,861,00046,836,0002,314,240stderr
9Apr 21, 2026 06:55217,635118,023,24545,028,00042,026,0002,318,336stderr