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 listApr 22, 2026 15:33Dominique GarmierDominique GarmierScore: 30,940Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 15:3428,32525,797,28110,300,0001,030,0002,510,848
2Apr 22, 2026 15:3429,29231,900,64210,652,0001,065,0002,506,752
3Apr 22, 2026 15:3429,60027,267,9109,867,0001,973,0002,502,656
4Apr 22, 2026 15:3430,77530,624,93010,259,0002,051,0002,510,848
5Apr 22, 2026 15:3430,94028,027,84410,314,0002,062,0002,510,848
6Apr 22, 2026 15:3431,69032,713,18811,620,0001,056,0002,510,848
7Apr 22, 2026 15:3432,06028,284,59810,851,0001,973,0002,514,944
8Apr 22, 2026 15:3433,04232,476,89511,184,0002,033,0002,338,816
9Apr 22, 2026 15:3433,76235,097,14312,467,0001,038,0002,510,848