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 20, 2026 16:46BenBenScore: 1,090,385Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 16:471,089,732465,925,388433,894,0001,999,0002,478,080
2Apr 20, 2026 16:471,090,042462,395,503434,017,0002,000,0002,486,272
3Apr 20, 2026 16:471,090,140462,005,622434,056,0002,000,0002,473,984
4Apr 20, 2026 16:471,090,195466,635,881434,078,0002,000,0002,260,992
5Apr 20, 2026 16:471,090,385466,480,181433,153,0003,001,0002,473,984
6Apr 20, 2026 16:471,090,800459,330,621434,319,0002,001,0002,260,992
7Apr 20, 2026 16:471,091,705453,567,898434,684,0001,998,0002,273,280
8Apr 20, 2026 16:471,092,135455,565,119434,855,0001,999,0002,277,376
9Apr 20, 2026 16:471,092,835453,508,968434,134,0003,000,0002,269,184