結果
| 問題 | No.979 Longest Divisor Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-19 23:36:47 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 440 ms / 2,000 ms |
| + 445µs | |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 64,236 KB |
| 実行使用メモリ | 96,432 KB |
| 最終ジャッジ日時 | 2026-10-22 12:13:14 |
| 合計ジャッジ時間 | 3,927 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
x=[0]*(5*10**5)
for i in a:
c=1
if i>1:
c=x[1]+1
for j in range(2,int(i**0.5)+1):
if i%j:
continue
c=max(c,x[j]+1,x[i//j]+1)
x[i]=max(x[i],c)
print(max(x))