結果

問題 No.2210 equence Squence Seuence
ユーザー tktk_snsntktk_snsn
提出日時 2023-02-11 19:49:19
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 285 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 86,860 KB
実行使用メモリ 110,604 KB
最終ジャッジ日時 2023-09-22 15:29:09
合計ジャッジ時間 6,697 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 91 ms
71,656 KB
testcase_02 AC 92 ms
71,544 KB
testcase_03 AC 136 ms
82,940 KB
testcase_04 AC 128 ms
87,312 KB
testcase_05 AC 133 ms
92,848 KB
testcase_06 AC 130 ms
89,588 KB
testcase_07 AC 164 ms
104,208 KB
testcase_08 AC 90 ms
71,644 KB
testcase_09 AC 91 ms
71,464 KB
testcase_10 AC 89 ms
71,632 KB
testcase_11 AC 90 ms
71,632 KB
testcase_12 AC 89 ms
71,560 KB
testcase_13 AC 178 ms
110,472 KB
testcase_14 AC 179 ms
110,480 KB
testcase_15 AC 205 ms
110,232 KB
testcase_16 AC 178 ms
110,472 KB
testcase_17 AC 178 ms
110,604 KB
testcase_18 AC 90 ms
71,236 KB
testcase_19 AC 89 ms
71,612 KB
testcase_20 AC 89 ms
71,688 KB
testcase_21 AC 92 ms
71,588 KB
testcase_22 AC 89 ms
71,704 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
権限があれば一括ダウンロードができます

ソースコード

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