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 11, 2026 08:38Victor MerckléVictor MerckléScore: 5,135Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2026 08:404,10211,025,02601,641,0002,195,456
2Jun 11, 2026 08:404,47211,144,94301,789,0002,195,456
3Jun 11, 2026 08:404,92510,938,70401,970,0002,195,456
4Jun 11, 2026 08:405,0309,392,73302,012,0002,166,784
5Jun 11, 2026 08:405,13510,874,26602,054,0002,166,784
6Jun 11, 2026 08:405,27511,772,29302,110,0002,195,456
7Jun 11, 2026 08:406,2759,877,8041,325,0001,185,0002,195,456
8Jun 11, 2026 08:406,4929,976,3701,416,0001,181,0002,195,456
9Jun 11, 2026 08:406,53011,849,8291,486,0001,126,0002,195,456