結果
問題 | No.2218 Multiple LIS |
ユーザー |
![]() |
提出日時 | 2023-02-18 10:06:16 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 436 bytes |
コンパイル時間 | 684 ms |
コンパイル使用メモリ | 87,008 KB |
実行使用メモリ | 85,284 KB |
最終ジャッジ日時 | 2023-09-27 04:11:08 |
合計ジャッジ時間 | 8,374 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
75,980 KB |
testcase_01 | AC | 70 ms
71,316 KB |
testcase_02 | AC | 68 ms
71,320 KB |
testcase_03 | AC | 70 ms
71,284 KB |
testcase_04 | AC | 69 ms
71,328 KB |
testcase_05 | AC | 68 ms
71,060 KB |
testcase_06 | AC | 69 ms
71,452 KB |
testcase_07 | AC | 71 ms
71,320 KB |
testcase_08 | AC | 68 ms
71,580 KB |
testcase_09 | AC | 71 ms
71,488 KB |
testcase_10 | AC | 71 ms
71,168 KB |
testcase_11 | AC | 71 ms
71,184 KB |
testcase_12 | AC | 79 ms
76,396 KB |
testcase_13 | AC | 89 ms
76,476 KB |
testcase_14 | AC | 83 ms
76,476 KB |
testcase_15 | AC | 84 ms
76,400 KB |
testcase_16 | AC | 74 ms
75,940 KB |
testcase_17 | AC | 85 ms
76,616 KB |
testcase_18 | AC | 73 ms
75,700 KB |
testcase_19 | AC | 77 ms
76,428 KB |
testcase_20 | AC | 85 ms
76,448 KB |
testcase_21 | AC | 301 ms
76,748 KB |
testcase_22 | TLE | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
ソースコード
# dpでTLEした # エラトステネスのようにやるか N = int(input()) A = list(map(int, input().split())) #from collections import defaultdict #A_position = defaultdict(list) #for i in range(N): # A_position[A[i]].append(i) dp = [1]*N maxA = max(A) for i in range(N): current = dp[i] for j in range(i+1, N): if A[j]%A[i] == 0: dp[j] = max(dp[j], current+1) #print(dp) ans = max(dp) print(ans)