結果

問題 No.390 最長の数列
ユーザー 👑 H20H20
提出日時 2021-01-21 13:22:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 231 bytes
コンパイル時間 1,787 ms
コンパイル使用メモリ 86,696 KB
実行使用メモリ 92,124 KB
最終ジャッジ日時 2023-08-26 00:38:05
合計ジャッジ時間 10,657 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,152 KB
testcase_01 AC 72 ms
71,148 KB
testcase_02 AC 72 ms
71,160 KB
testcase_03 AC 71 ms
71,032 KB
testcase_04 AC 71 ms
71,284 KB
testcase_05 AC 139 ms
92,124 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N = int(input())
A = list(map(int,input().split()))
A.sort()
L = [1]*N
for i in range(N):
    for j in range(bisect.bisect_left(A, A[i]*2),N):
        if A[j]%A[i]==0:
            L[j] = max(L[j],L[i]+1)
print(max(L))
0