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 27, 2026 18:26Charles CabergsCharles CabergsScore: 95,527Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 18:2793,66053,248,44215,188,00022,276,0002,514,944
2Apr 27, 2026 18:2794,14553,185,97423,409,00014,249,0002,482,176
3Apr 27, 2026 18:2794,60751,558,67721,909,00015,934,0002,506,752
4Apr 27, 2026 18:2794,94557,779,85818,989,00018,989,0002,506,752
5Apr 27, 2026 18:2795,52758,532,98723,128,00015,083,0002,510,848
6Apr 27, 2026 18:27103,58059,057,56124,253,00017,179,0002,506,752
7Apr 27, 2026 18:27103,96061,239,18024,342,00017,242,0002,514,944
8Apr 27, 2026 18:27104,05055,811,52124,363,00017,257,0002,347,008
9Apr 27, 2026 18:27104,56760,708,34817,926,00023,901,0002,506,752