結果

問題 No.2210 equence Squence Seuence
ユーザー tktk_snsn
提出日時 2023-02-11 19:49:19
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 285 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 106,880 KB
最終ジャッジ日時 2024-07-08 07:04:32
合計ジャッジ時間 3,882 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 20 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque


N, K = map(int, input().split())
A = list(map(int, input().split()))

D = deque([N-1])
for i in reversed(range(N-1)):
    if A[i] > A[i+1]:
        func = D.appendleft
    elif A[i] < A[i+1]:
        func = D.append
    func(i)


del A[D[K-1]]
print(*A)
0