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 26, 2026 21:39TudyMTudyMScore: 104,865Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 21:40103,09558,927,49636,209,0005,029,0002,314,240
2Apr 26, 2026 21:40103,40062,537,45834,299,0007,061,0002,351,104
3Apr 26, 2026 21:40103,93558,555,57335,490,0006,084,0002,404,352
4Apr 26, 2026 21:40104,70258,179,56935,752,0006,129,0002,314,240
5Apr 26, 2026 21:40104,86558,111,03036,953,0004,993,0002,310,144
6Apr 26, 2026 21:40105,49056,430,05135,164,0007,032,0002,306,048
7Apr 26, 2026 21:40106,91264,840,83436,798,0005,967,0002,306,048
8Apr 26, 2026 21:40107,03260,893,94634,848,0007,965,0002,318,336
9Apr 26, 2026 21:40108,90762,844,97536,472,0007,091,0002,301,952