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:15TudyMTudyMScore: 1,011,200Success
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:161,009,827421,454,637393,933,0009,998,0002,498,560
2Apr 26, 2026 21:161,010,027422,925,721393,011,00011,000,0002,498,560
3Apr 26, 2026 21:161,010,230424,443,518392,090,00012,002,0002,502,656
4Apr 26, 2026 21:161,010,842419,825,142392,327,00012,010,0002,306,048
5Apr 26, 2026 21:161,011,200420,441,837393,467,00011,013,0002,293,760
6Apr 26, 2026 21:161,011,215419,624,179395,476,0009,010,0002,486,272
7Apr 26, 2026 21:161,011,357421,986,878394,555,0009,988,0002,486,272
8Apr 26, 2026 21:161,011,992426,195,792393,803,00010,994,0002,498,560
9Apr 26, 2026 21:161,012,855422,991,010395,139,00010,003,0002,482,176