結果

問題 No.2218 Multiple LIS
ユーザー googol_S0googol_S0
提出日時 2023-02-17 21:25:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 356 ms / 3,000 ms
コード長 295 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 86,696 KB
実行使用メモリ 101,436 KB
最終ジャッジ日時 2023-09-26 18:30:48
合計ジャッジ時間 13,736 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 242 ms
90,516 KB
testcase_01 AC 233 ms
90,568 KB
testcase_02 AC 235 ms
90,500 KB
testcase_03 AC 241 ms
90,308 KB
testcase_04 AC 245 ms
90,512 KB
testcase_05 AC 253 ms
90,644 KB
testcase_06 AC 249 ms
90,460 KB
testcase_07 AC 245 ms
90,520 KB
testcase_08 AC 251 ms
90,504 KB
testcase_09 AC 242 ms
90,664 KB
testcase_10 AC 246 ms
90,500 KB
testcase_11 AC 245 ms
90,620 KB
testcase_12 AC 237 ms
90,296 KB
testcase_13 AC 270 ms
101,436 KB
testcase_14 AC 266 ms
101,316 KB
testcase_15 AC 289 ms
101,276 KB
testcase_16 AC 253 ms
90,424 KB
testcase_17 AC 274 ms
101,068 KB
testcase_18 AC 247 ms
90,516 KB
testcase_19 AC 251 ms
90,408 KB
testcase_20 AC 267 ms
101,268 KB
testcase_21 AC 277 ms
100,684 KB
testcase_22 AC 284 ms
99,656 KB
testcase_23 AC 316 ms
98,968 KB
testcase_24 AC 268 ms
99,960 KB
testcase_25 AC 314 ms
98,668 KB
testcase_26 AC 334 ms
98,656 KB
testcase_27 AC 342 ms
98,884 KB
testcase_28 AC 343 ms
98,732 KB
testcase_29 AC 349 ms
98,668 KB
testcase_30 AC 356 ms
98,736 KB
testcase_31 AC 289 ms
98,756 KB
testcase_32 AC 297 ms
98,800 KB
testcase_33 AC 294 ms
98,752 KB
testcase_34 AC 282 ms
98,696 KB
testcase_35 AC 278 ms
98,816 KB
testcase_36 AC 262 ms
99,100 KB
testcase_37 AC 290 ms
98,868 KB
testcase_38 AC 234 ms
90,516 KB
testcase_39 AC 245 ms
90,460 KB
testcase_40 AC 308 ms
98,984 KB
testcase_41 AC 300 ms
99,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
M=100000
D=[[] for i in range(M+1)]
DP=[0]*(M+1)
for i in range(1,M+1):
  for j in range(i,M+1,i):
    D[j].append(i)
for i in range(N):
  v=0
  for j in range(len(D[A[i]])):
    v=max(v,DP[D[A[i]][j]]+1)
  DP[A[i]]=max(DP[A[i]],v)
print(max(DP))
0