結果
問題 |
No.2218 Multiple LIS
|
ユーザー |
![]() |
提出日時 | 2023-02-17 22:07:58 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 1,005 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 148,864 KB |
最終ジャッジ日時 | 2024-07-19 13:18:39 |
合計ジャッジ時間 | 6,687 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 TLE * 1 -- * 19 |
ソースコード
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()))