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 10:40C#_userC#_userScore: 1,082,295Success
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 10:441,078,575442,229,820385,778,00045,652,0002,117,632stderr
2Sep 5, 2026 10:441,079,815444,227,243386,981,00044,945,0002,117,632stderr
3Sep 5, 2026 10:441,079,820442,049,580386,762,00045,166,0002,117,632stderr
4Sep 5, 2026 10:441,081,810442,870,850387,635,00045,089,0002,117,632stderr
5Sep 5, 2026 10:441,082,295443,079,653387,716,00045,202,0002,117,632stderr
6Sep 5, 2026 10:441,082,770443,543,181387,855,00045,253,0002,117,632stderr
7Sep 5, 2026 10:441,083,020443,521,396387,778,00045,430,0002,117,632stderr
8Sep 5, 2026 10:441,083,097443,395,272387,898,00045,341,0002,117,632stderr
9Sep 5, 2026 10:441,084,270443,909,907387,741,00045,967,0002,117,632stderr