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: 101,357Success
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:2497,14056,655,97934,300,0004,556,0002,502,656
2May 9, 2026 19:2498,16058,177,05334,664,0004,600,0002,502,656
3May 9, 2026 19:24100,43557,974,18935,629,0004,545,0002,498,560
4May 9, 2026 19:24100,94258,608,05035,822,0004,555,0002,498,560
5May 9, 2026 19:24101,35758,914,28436,184,0004,359,0002,498,560
6May 9, 2026 19:24101,61259,084,57836,178,0004,467,0002,494,464
7May 9, 2026 19:24104,04259,693,76536,866,0004,751,0002,494,464
8May 9, 2026 19:24124,06568,714,49345,272,0004,354,0002,498,560
9May 9, 2026 19:24137,66572,506,05150,291,0004,775,0002,502,656