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 9, 2026 19:21E SequeiraE SequeiraScore: 90,682Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:2577,69250,347,27226,580,0004,497,0002,490,368
2May 9, 2026 19:2590,18550,452,39331,549,0004,525,0002,502,656
3May 9, 2026 19:2590,22252,753,95631,493,0004,596,0002,502,656
4May 9, 2026 19:2590,63753,055,24131,581,0004,674,0002,498,560
5May 9, 2026 19:2590,68254,966,21431,537,0004,736,0002,502,656
6May 9, 2026 19:2590,97752,128,22831,634,0004,757,0002,506,752
7May 9, 2026 19:2591,65556,797,68032,118,0004,544,0002,498,560
8May 9, 2026 19:2597,72255,348,74234,522,0004,567,0002,498,560
9May 9, 2026 19:25107,85763,945,39238,757,0004,386,0002,498,560