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 22:07TonyTonyScore: 1,309,330Success
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 22:091,306,722546,542,139399,639,000123,050,00077,824
2Aug 1, 2026 22:091,307,290548,633,967399,756,000123,160,00073,728
3Aug 1, 2026 22:091,307,912542,306,390399,668,000123,497,00020,480
4Aug 1, 2026 22:091,308,950546,310,196399,657,000123,923,00061,440
5Aug 1, 2026 22:091,309,330561,714,793399,872,000123,860,00077,824
6Aug 1, 2026 22:091,310,735544,225,684400,406,000123,888,00061,440
7Aug 1, 2026 22:091,318,500547,322,119399,913,000127,487,00020,480
8Aug 1, 2026 22:091,321,592555,761,510400,264,000128,373,00020,480
9Aug 1, 2026 22:091,322,312558,724,887400,445,000128,480,00020,480