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 listAug 1, 2026 03:44Warren FuWarren FuScore: 1,288,622Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2026 03:451,287,452525,103,767500,904,00014,077,0002,117,632
2Aug 1, 2026 03:451,287,717525,225,457501,060,00014,027,0002,113,536
3Aug 1, 2026 03:451,287,870525,344,829501,105,00014,043,0002,113,536
4Aug 1, 2026 03:451,288,057525,348,140501,177,00014,046,0002,113,536
5Aug 1, 2026 03:451,288,622525,516,340501,393,00014,056,0002,113,536
6Aug 1, 2026 03:451,288,792525,744,244501,465,00014,052,0002,113,536
7Aug 1, 2026 03:451,289,092525,772,152501,508,00014,129,0002,113,536
8Aug 1, 2026 03:451,289,277525,827,899501,624,00014,087,0002,113,536
9Aug 1, 2026 03:451,289,757525,981,653502,869,00013,034,0002,113,536