結果

問題 No.2218 Multiple LIS
ユーザー ikomaikoma
提出日時 2023-02-17 22:07:58
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 294 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 86,640 KB
実行使用メモリ 146,004 KB
最終ジャッジ日時 2023-09-26 19:24:12
合計ジャッジ時間 8,288 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
76,004 KB
testcase_01 AC 94 ms
71,448 KB
testcase_02 AC 91 ms
71,556 KB
testcase_03 AC 93 ms
71,416 KB
testcase_04 AC 93 ms
71,180 KB
testcase_05 AC 93 ms
71,488 KB
testcase_06 AC 92 ms
71,380 KB
testcase_07 AC 92 ms
71,556 KB
testcase_08 AC 94 ms
71,132 KB
testcase_09 AC 91 ms
71,516 KB
testcase_10 AC 93 ms
71,292 KB
testcase_11 AC 92 ms
71,452 KB
testcase_12 AC 105 ms
77,072 KB
testcase_13 AC 106 ms
77,204 KB
testcase_14 AC 104 ms
76,920 KB
testcase_15 AC 103 ms
76,916 KB
testcase_16 AC 101 ms
76,992 KB
testcase_17 AC 106 ms
77,056 KB
testcase_18 AC 99 ms
76,732 KB
testcase_19 AC 100 ms
76,768 KB
testcase_20 AC 103 ms
77,128 KB
testcase_21 AC 533 ms
80,668 KB
testcase_22 TLE -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import defaultdict

N=int(input())
A=list(map(int,input().split()))

ans=defaultdict(int)
for a in A:
    x=1
    for k,v in list(ans.items()):
        if a%k==0:
            x = max(x,v+1)
    ans[a]=x
print(max(v for v in ans.values()))
0