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 listOct 8, 2025 21:19Yuriy LyfenkoYuriy LyfenkoScore: 11,355Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 8, 2025 21:199,94321,362,0752,983,000994,0002,404,352
2Oct 8, 2025 21:1810,15521,242,4772,031,0002,031,0002,285,568
3Oct 8, 2025 21:1910,33025,009,3092,066,0002,066,0002,404,352
4Oct 8, 2025 21:1810,42523,427,9502,085,0002,085,0002,412,544
5Oct 8, 2025 21:1810,59024,565,6252,118,0002,118,0002,285,568
6Oct 8, 2025 21:1810,71522,291,7032,143,0002,143,0002,281,472
7Oct 8, 2025 21:1910,87021,051,2992,174,0002,174,0002,416,640
8Oct 8, 2025 21:1811,23522,548,4023,371,0001,123,0002,404,352
9Oct 8, 2025 21:1911,32522,350,2664,530,00002,281,472
10Oct 8, 2025 21:1911,35524,273,2763,407,0001,135,0002,400,256
11Oct 8, 2025 21:1811,36021,074,4223,408,0001,136,0002,408,448
12Oct 8, 2025 21:1911,41521,167,7994,566,00002,416,640
13Oct 8, 2025 21:1911,44322,668,8913,433,0001,144,0002,400,256
14Oct 8, 2025 21:1911,49321,573,5813,448,0001,149,0002,404,352
15Oct 8, 2025 21:1811,52021,773,0683,456,0001,152,0002,412,544
16Oct 8, 2025 21:1811,58020,894,9143,474,0001,158,0002,400,256
17Oct 8, 2025 21:1911,76522,028,7363,530,0001,176,0002,408,448
18Oct 8, 2025 21:1811,87820,355,6144,751,00002,502,656