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 listJul 2, 2026 11:53A_ShamanA_ShamanScore: 459,402Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2026 11:54459,152192,971,853182,632,0001,029,0002,113,536
2Jul 2, 2026 11:54459,155193,003,194182,658,0001,004,0002,113,536
3Jul 2, 2026 11:54459,192192,933,233182,648,0001,029,0002,113,536
4Jul 2, 2026 11:54459,205193,080,596182,673,0001,009,0002,113,536
5Jul 2, 2026 11:54459,402193,085,202182,754,0001,007,0002,113,536
6Jul 2, 2026 11:54459,405194,411,419182,678,0001,084,0002,113,536
7Jul 2, 2026 11:54459,407193,033,499182,749,0001,014,0002,113,536
8Jul 2, 2026 11:54459,412193,070,258182,761,0001,004,0002,113,536
9Jul 2, 2026 11:54459,877193,441,780182,800,0001,151,0002,113,536