結果

問題 No.2218 Multiple LIS
ユーザー chankei271828chankei271828
提出日時 2023-02-17 21:44:20
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 401 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 86,384 KB
実行使用メモリ 104,304 KB
最終ジャッジ日時 2023-09-26 18:58:56
合計ジャッジ時間 11,979 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 207 ms
89,732 KB
testcase_01 AC 190 ms
89,696 KB
testcase_02 AC 204 ms
89,692 KB
testcase_03 AC 195 ms
90,084 KB
testcase_04 AC 193 ms
89,948 KB
testcase_05 AC 195 ms
89,668 KB
testcase_06 AC 195 ms
89,876 KB
testcase_07 AC 211 ms
89,692 KB
testcase_08 AC 192 ms
90,096 KB
testcase_09 AC 224 ms
89,624 KB
testcase_10 AC 196 ms
90,084 KB
testcase_11 AC 198 ms
89,660 KB
testcase_12 AC 197 ms
90,096 KB
testcase_13 AC 197 ms
89,788 KB
testcase_14 AC 198 ms
89,680 KB
testcase_15 AC 193 ms
89,836 KB
testcase_16 AC 194 ms
89,812 KB
testcase_17 AC 193 ms
89,808 KB
testcase_18 AC 194 ms
89,748 KB
testcase_19 AC 194 ms
89,792 KB
testcase_20 AC 198 ms
90,100 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 243 ms
98,720 KB
testcase_24 AC 224 ms
99,560 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 273 ms
97,720 KB
testcase_28 AC 269 ms
97,812 KB
testcase_29 AC 272 ms
97,832 KB
testcase_30 RE -
testcase_31 AC 234 ms
98,096 KB
testcase_32 AC 233 ms
98,368 KB
testcase_33 AC 236 ms
98,416 KB
testcase_34 AC 243 ms
98,360 KB
testcase_35 AC 223 ms
98,120 KB
testcase_36 AC 217 ms
98,692 KB
testcase_37 RE -
testcase_38 AC 197 ms
89,772 KB
testcase_39 AC 207 ms
89,880 KB
testcase_40 AC 233 ms
97,748 KB
testcase_41 AC 235 ms
97,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
d=[[] for _ in range(10**5+1)]
for i in range(1,10**5+1):
    ima=i
    while ima<=10**5:
        d[ima].append(i)
        ima+=i
dp=[0]*(10**5)
#dp[n]:今見てるまでで、ラストの数字がnになってる部分列の長さのmax
for i in range(N):
    temp=0
    for q in d[A[i]]:
        temp=max(temp,dp[q])
    dp[A[i]]=temp+1
print(max(dp))
0