結果

問題 No.2218 Multiple LIS
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-02-17 22:04:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 649 ms / 3,000 ms
コード長 220 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 86,628 KB
実行使用メモリ 94,272 KB
最終ジャッジ日時 2023-09-26 19:21:15
合計ジャッジ時間 10,697 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,412 KB
testcase_01 AC 77 ms
71,020 KB
testcase_02 AC 74 ms
71,328 KB
testcase_03 AC 73 ms
71,096 KB
testcase_04 AC 76 ms
71,048 KB
testcase_05 AC 77 ms
70,936 KB
testcase_06 AC 75 ms
71,452 KB
testcase_07 AC 74 ms
71,504 KB
testcase_08 AC 75 ms
70,912 KB
testcase_09 AC 72 ms
71,504 KB
testcase_10 AC 73 ms
70,940 KB
testcase_11 AC 74 ms
71,272 KB
testcase_12 AC 79 ms
75,684 KB
testcase_13 AC 82 ms
76,424 KB
testcase_14 AC 82 ms
76,392 KB
testcase_15 AC 82 ms
76,500 KB
testcase_16 AC 78 ms
75,732 KB
testcase_17 AC 83 ms
76,616 KB
testcase_18 AC 75 ms
71,332 KB
testcase_19 AC 77 ms
75,632 KB
testcase_20 AC 84 ms
76,496 KB
testcase_21 AC 109 ms
77,260 KB
testcase_22 AC 235 ms
81,228 KB
testcase_23 AC 343 ms
85,212 KB
testcase_24 AC 141 ms
77,360 KB
testcase_25 AC 376 ms
86,536 KB
testcase_26 AC 501 ms
91,520 KB
testcase_27 AC 499 ms
91,472 KB
testcase_28 AC 498 ms
91,352 KB
testcase_29 AC 499 ms
91,420 KB
testcase_30 AC 504 ms
91,628 KB
testcase_31 AC 215 ms
90,512 KB
testcase_32 AC 233 ms
90,672 KB
testcase_33 AC 218 ms
90,616 KB
testcase_34 AC 215 ms
90,636 KB
testcase_35 AC 232 ms
90,604 KB
testcase_36 AC 99 ms
89,056 KB
testcase_37 AC 603 ms
94,272 KB
testcase_38 AC 75 ms
71,256 KB
testcase_39 AC 75 ms
71,380 KB
testcase_40 AC 646 ms
91,388 KB
testcase_41 AC 649 ms
91,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dp = [0]*(max(A)+1)

for a in A:
    for j in range(1,int(a**0.5)+1):
        if a%j:
            continue
        dp[a] = max(dp[a],dp[j]+1,dp[a//j]+1)
print(max(dp))
0