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 20, 2025 21:53Aniruddha DebAniruddha DebScore: 851,023Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 20, 2025 22:443,41320,742,4301,365,00002,428,928
2Aug 20, 2025 22:173,42518,820,1601,370,00002,420,736
3Aug 20, 2025 21:533,45316,588,2481,381,00002,424,832
4Aug 20, 2025 22:443,46016,077,3991,384,00002,433,024
5Aug 20, 2025 22:123,50314,574,2591,401,00002,510,848
6Aug 20, 2025 22:233,50317,210,7681,401,00002,428,928
7Aug 20, 2025 21:523,73013,470,9311,492,00002,428,928
8Aug 20, 2025 22:44850,423360,776,138339,169,0001,000,0002,277,376
9Aug 20, 2025 22:11850,448368,714,409340,179,00002,539,520
10Aug 20, 2025 22:36850,650364,874,206340,260,00002,412,544
11Aug 20, 2025 22:46850,688362,895,398340,275,00002,277,376
12Aug 20, 2025 22:46850,890366,797,436340,356,00002,502,656
13Aug 20, 2025 22:11850,933367,074,463340,373,00002,408,448
14Aug 20, 2025 21:52851,023359,216,613339,408,0001,001,0002,416,640
15Aug 20, 2025 22:17851,033366,260,345340,413,00002,539,520
16Aug 20, 2025 22:23851,065365,167,966340,426,00002,539,520
17Aug 20, 2025 22:17851,083366,704,420340,433,00002,277,376
18Aug 20, 2025 21:52851,153372,457,038340,461,00002,277,376
19Aug 20, 2025 22:36851,345368,280,887339,540,000998,0002,277,376
20Aug 20, 2025 22:12851,678362,920,738339,672,000999,0002,539,520
21Aug 20, 2025 21:53851,703366,220,540338,683,0001,998,0002,531,328
22Aug 20, 2025 22:23851,708369,588,170340,683,00002,408,448
23Aug 20, 2025 21:53851,740365,270,085339,697,000999,0002,531,328
24Aug 20, 2025 22:46851,865365,936,846339,747,000999,0002,404,352
25Aug 20, 2025 22:36852,358359,788,037339,944,000999,0002,408,448
26Aug 20, 2025 22:12852,455365,956,746339,983,000999,0002,277,376
27Aug 20, 2025 22:11852,773360,609,027341,109,00002,408,448