結果

問題 No.2210 equence Squence Seuence
ユーザー ShirotsumeShirotsume
提出日時 2023-02-11 00:06:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 923 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 121,492 KB
最終ジャッジ日時 2023-09-22 00:53:47
合計ジャッジ時間 6,452 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,832 KB
testcase_01 AC 95 ms
71,772 KB
testcase_02 AC 95 ms
71,572 KB
testcase_03 AC 126 ms
83,780 KB
testcase_04 WA -
testcase_05 AC 161 ms
94,264 KB
testcase_06 AC 138 ms
91,040 KB
testcase_07 AC 179 ms
115,172 KB
testcase_08 AC 98 ms
71,828 KB
testcase_09 AC 94 ms
71,584 KB
testcase_10 AC 96 ms
71,568 KB
testcase_11 WA -
testcase_12 AC 95 ms
71,708 KB
testcase_13 AC 196 ms
119,784 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 194 ms
119,824 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 98 ms
71,956 KB
testcase_20 AC 97 ms
71,776 KB
testcase_21 AC 95 ms
71,544 KB
testcase_22 WA -
testcase_23 AC 178 ms
112,088 KB
testcase_24 AC 166 ms
104,396 KB
testcase_25 AC 161 ms
108,068 KB
testcase_26 AC 180 ms
120,644 KB
testcase_27 AC 128 ms
86,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, Counter
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

n, k = mi()

a = li()

q = deque([n - 1])

for i in range(n - 2, -1, -1):
    if a[i] <= a[i+1]:
        q.append(i)
    else:
        q.appendleft(i)
print(*(a[:q[k-1]] + a[q[k-1]+1:]))
    
0