結果

問題 No.2218 Multiple LIS
ユーザー chankei271828chankei271828
提出日時 2023-02-17 21:46:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 290 ms / 3,000 ms
コード長 403 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 99,680 KB
最終ジャッジ日時 2023-09-26 19:01:13
合計ジャッジ時間 11,319 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 193 ms
89,912 KB
testcase_01 AC 202 ms
90,156 KB
testcase_02 AC 197 ms
89,908 KB
testcase_03 AC 199 ms
89,916 KB
testcase_04 AC 198 ms
89,900 KB
testcase_05 AC 192 ms
89,812 KB
testcase_06 AC 207 ms
90,048 KB
testcase_07 AC 200 ms
89,964 KB
testcase_08 AC 200 ms
89,800 KB
testcase_09 AC 215 ms
89,904 KB
testcase_10 AC 205 ms
89,820 KB
testcase_11 AC 203 ms
89,984 KB
testcase_12 AC 191 ms
89,888 KB
testcase_13 AC 184 ms
89,764 KB
testcase_14 AC 195 ms
89,880 KB
testcase_15 AC 196 ms
90,052 KB
testcase_16 AC 193 ms
89,992 KB
testcase_17 AC 198 ms
89,936 KB
testcase_18 AC 195 ms
89,904 KB
testcase_19 AC 198 ms
89,892 KB
testcase_20 AC 196 ms
90,088 KB
testcase_21 AC 205 ms
89,880 KB
testcase_22 AC 235 ms
99,512 KB
testcase_23 AC 255 ms
98,856 KB
testcase_24 AC 221 ms
99,680 KB
testcase_25 AC 264 ms
98,844 KB
testcase_26 AC 277 ms
98,000 KB
testcase_27 AC 267 ms
97,996 KB
testcase_28 AC 260 ms
97,864 KB
testcase_29 AC 261 ms
97,864 KB
testcase_30 AC 290 ms
97,944 KB
testcase_31 AC 230 ms
98,284 KB
testcase_32 AC 229 ms
98,268 KB
testcase_33 AC 237 ms
98,416 KB
testcase_34 AC 234 ms
98,244 KB
testcase_35 AC 235 ms
98,304 KB
testcase_36 AC 221 ms
98,712 KB
testcase_37 AC 236 ms
97,724 KB
testcase_38 AC 204 ms
90,120 KB
testcase_39 AC 193 ms
89,808 KB
testcase_40 AC 237 ms
97,872 KB
testcase_41 AC 235 ms
97,944 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+1)
#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