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 listAug 1, 2026 03:57Warren FuWarren FuScore: 282,450Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2026 03:58281,820122,757,43198,552,00014,176,0002,113,536
2Aug 1, 2026 03:58281,925122,879,30498,597,00014,173,0002,113,536
3Aug 1, 2026 03:58282,052123,072,28098,646,00014,175,0002,113,536
4Aug 1, 2026 03:58282,072123,733,74298,646,00014,183,0002,113,536
5Aug 1, 2026 03:58282,450123,728,79998,788,00014,192,0002,113,536
6Aug 1, 2026 03:58282,477123,912,67498,792,00014,199,0002,113,536
7Aug 1, 2026 03:58282,607123,111,20898,842,00014,201,0002,113,536
8Aug 1, 2026 03:58283,645124,289,35598,333,00015,125,0002,113,536
9Aug 1, 2026 03:58285,280125,136,53499,015,00015,097,0002,113,536