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 listNov 19, 2025 19:23Yuriy LyfenkoYuriy LyfenkoScore: 4,513Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 19, 2025 19:274,08821,830,64801,635,0002,387,968
2Nov 19, 2025 19:274,12816,767,1211,651,00002,387,968
3Nov 19, 2025 19:274,14321,379,1691,657,00002,387,968
4Nov 19, 2025 19:274,14817,285,3431,659,00002,482,176
5Nov 19, 2025 19:234,30821,389,0971,723,00002,379,776
6Nov 19, 2025 19:274,31317,821,9431,725,00002,396,160
7Nov 19, 2025 19:234,40823,913,09601,763,0002,387,968
8Nov 19, 2025 19:234,44519,194,67701,778,0002,392,064
9Nov 19, 2025 19:234,47518,826,59301,790,0002,392,064
10Nov 19, 2025 19:274,51319,085,2611,805,00002,519,040
11Nov 19, 2025 19:234,53519,094,8411,814,00002,387,968
12Nov 19, 2025 19:234,77018,919,22501,908,0002,473,984
13Nov 19, 2025 19:274,77019,938,06001,908,0002,383,872
14Nov 19, 2025 19:234,79017,687,384958,000958,0002,392,064
15Nov 19, 2025 19:274,79514,698,063959,000959,0002,387,968
16Nov 19, 2025 19:234,80017,874,305960,000960,0002,383,872
17Nov 19, 2025 19:274,80023,140,361960,000960,0002,396,160
18Nov 19, 2025 19:234,83517,724,671967,000967,0002,392,064