結果

問題 No.2210 equence Squence Seuence
ユーザー flygonflygon
提出日時 2023-02-10 22:19:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 82,172 KB
実行使用メモリ 123,716 KB
最終ジャッジ日時 2024-07-07 16:31:30
合計ジャッジ時間 3,778 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = list(map(int,input().split()))

ans = -1
for i in range(n-1):
  x,y = a[i], a[i+1]
  if k == 1 and y < x:
    ans = i
  elif y <= x:
    k = max(1, k-1)
  if x < y and k == n-i:
    ans = i
  if ans != -1:
    break
  
if ans == -1:
  ans = n-1

b = []
for i in range(n):
  if i != ans:
    b.append(a[i])
  
print(*b)

0