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 22, 2026 15:42Dominique GarmierDominique GarmierScore: 45,490Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 15:4331,62530,521,38711,596,0001,054,0002,506,752
2Apr 22, 2026 15:4338,85735,884,58714,507,0001,036,0002,514,944
3Apr 22, 2026 15:4343,91730,916,47816,534,0001,033,0002,502,656
4Apr 22, 2026 15:4345,19532,499,76616,070,0002,008,0002,498,560
5Apr 22, 2026 15:4345,49039,753,42416,175,0002,021,0002,502,656
6Apr 22, 2026 15:4345,95240,207,55517,360,0001,021,0002,342,912
7Apr 22, 2026 15:4346,39732,847,65617,528,0001,031,0002,506,752
8Apr 22, 2026 15:4346,59535,385,61317,603,0001,035,0002,342,912
9Apr 22, 2026 15:4348,89037,577,40318,527,0001,029,0002,342,912