Largest Square Submatrix of all 1's C#_user

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 listSep 5, 2026 09:26C#_userC#_userScore: 1,096,227Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 09:271,090,945444,891,146392,267,00044,111,0002,117,632
2Sep 5, 2026 09:271,091,017452,839,505391,523,00044,884,0002,117,632
3Sep 5, 2026 09:271,095,315446,632,396394,026,00044,100,0002,117,632
4Sep 5, 2026 09:271,095,585446,865,685394,482,00043,752,0002,117,632
5Sep 5, 2026 09:271,096,227447,136,321394,502,00043,989,0002,117,632
6Sep 5, 2026 09:271,096,610447,096,742394,550,00044,094,0002,117,632
7Sep 5, 2026 09:271,096,837447,276,643394,775,00043,960,0002,117,632
8Sep 5, 2026 09:271,097,000448,664,333394,988,00043,812,0002,117,632
9Sep 5, 2026 09:271,098,282447,899,091395,430,00043,883,0002,117,632