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 28, 2026 09:00Charles CabergsCharles CabergsScore: 223,697Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 28, 2026 09:02159,18586,392,54745,482,00018,192,0002,494,464stderr
2Apr 28, 2026 09:02159,49081,407,08947,847,00015,949,0002,486,272stderr
3Apr 28, 2026 09:02217,830105,589,36772,110,00015,022,0002,473,984stderr
4Apr 28, 2026 09:02220,935107,473,94666,281,00022,093,0002,506,752stderr
5Apr 28, 2026 09:02223,697103,182,33468,366,00021,113,0002,437,120stderr
6Apr 28, 2026 09:02226,037111,680,02674,342,00016,073,0002,523,136stderr
7Apr 28, 2026 09:02233,027112,513,90670,159,00023,052,0002,494,464stderr
8Apr 28, 2026 09:02233,142110,417,53576,210,00017,047,0002,494,464stderr
9Apr 28, 2026 09:02236,885114,312,31272,811,00021,943,0002,527,232stderr