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 19:36TudyMTudyMScore: 175,152Success
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 19:38167,28285,056,67160,921,0005,992,0002,310,144
2Apr 27, 2026 19:38173,05787,835,87762,201,0007,022,0002,306,048
3Apr 27, 2026 19:38173,25783,519,66662,273,0007,030,0002,318,336
4Apr 27, 2026 19:38173,30285,462,13664,298,0005,023,0002,310,144
5Apr 27, 2026 19:38175,15287,737,30662,054,0008,007,0002,306,048
6Apr 27, 2026 19:38177,22287,457,99464,899,0005,990,0002,330,624
7Apr 27, 2026 19:38177,31290,203,06365,931,0004,994,0002,310,144
8Apr 27, 2026 19:38179,76285,615,39167,911,0003,994,0002,396,160
9Apr 27, 2026 19:38180,48592,122,57267,181,0005,013,0002,322,432