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 06:57olliecrowolliecrowScore: 10,545Success
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 06:5910,24016,378,3791,024,0003,072,0002,547,712
2Apr 22, 2026 06:5910,45016,223,5312,090,0002,090,0002,535,424
3Apr 22, 2026 06:5910,49522,086,8023,149,0001,049,0002,539,520
4Apr 22, 2026 06:5910,52218,590,2163,157,0001,052,0002,551,808
5Apr 22, 2026 06:5910,54524,813,7583,164,0001,054,0002,543,616
6Apr 22, 2026 06:5910,71521,176,3603,215,0001,071,0002,543,616
7Apr 22, 2026 06:5910,81218,182,7023,244,0001,081,0002,551,808
8Apr 22, 2026 06:5910,94524,322,5803,284,0001,094,0002,543,616
9Apr 22, 2026 06:5911,35721,583,1214,543,00002,555,904