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 listMay 25, 2025 01:33etherealetherealScore: 308,903Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 25, 2025 01:33308,118148,092,302121,243,0002,004,0002,338,816
2May 25, 2025 01:33308,295149,554,258122,316,0001,002,0002,400,256
3May 25, 2025 01:33308,598144,749,635122,436,0001,003,0002,334,720
4May 25, 2025 01:33308,868149,619,910122,543,0001,004,0002,338,816
5May 25, 2025 01:33308,903149,406,653122,557,0001,004,0002,338,816
6May 25, 2025 01:33308,973150,139,730122,585,0001,004,0002,387,968
7May 25, 2025 01:33309,020152,569,865123,608,00002,338,816
8May 25, 2025 01:33309,105149,450,545123,642,00002,383,872
9May 25, 2025 01:33309,803150,123,593121,923,0001,998,0002,338,816