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 listMay 17, 2026 10:00M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 10:02017,095,4193,639,0001,271,0002,121,728expected "55", got "50 "
2May 17, 2026 10:0211,82714,630,8403,695,0001,036,0002,121,728
3May 17, 2026 10:0212,13217,085,8283,795,0001,058,0002,121,728
4May 17, 2026 10:0212,25513,826,5903,689,0001,213,0002,121,728
5May 17, 2026 10:0212,26216,574,1493,676,0001,229,0002,121,728
6May 17, 2026 10:0212,28714,220,2003,616,0001,299,0002,121,728
7May 17, 2026 10:0212,47015,351,9353,681,0001,307,0002,121,728
8May 17, 2026 10:0212,47215,662,9783,685,0001,304,0002,121,728
9May 17, 2026 10:0212,57714,223,9033,700,0001,331,0002,121,728