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 listMar 13, 2026 11:22Dominique GarmierDominique GarmierScore: 867,423Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 13, 2026 11:22864,210372,515,870343,686,0001,998,0002,494,464
2Mar 13, 2026 11:22865,860376,502,113345,344,0001,000,0002,289,664
3Mar 13, 2026 11:22866,365373,328,185344,549,0001,997,0002,498,560
4Mar 13, 2026 11:22866,785372,290,777344,716,0001,998,0002,289,664
5Mar 13, 2026 11:22867,423373,695,134346,969,00002,457,600
6Mar 13, 2026 11:22867,515370,134,634346,006,0001,000,0002,347,008
7Mar 13, 2026 11:22867,640377,186,792345,056,0002,000,0002,498,560
8Mar 13, 2026 11:22868,485367,489,881346,393,0001,001,0002,289,664
9Mar 13, 2026 11:22868,845376,344,651346,537,0001,001,0002,289,664