結果
| 問題 | No.2218 Multiple LIS |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-02-17 22:07:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 294 bytes |
| 記録 | |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 84,784 KB |
| 実行使用メモリ | 92,756 KB |
| 最終ジャッジ日時 | 2026-04-02 16:50:58 |
| 合計ジャッジ時間 | 6,754 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()))
ikoma