結果

問題 No.2210 equence Squence Seuence
ユーザー flygonflygon
提出日時 2023-02-10 21:41:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 125,084 KB
最終ジャッジ日時 2023-09-21 22:47:21
合計ジャッジ時間 5,266 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,280 KB
testcase_01 AC 72 ms
71,092 KB
testcase_02 AC 72 ms
70,996 KB
testcase_03 AC 102 ms
85,504 KB
testcase_04 WA -
testcase_05 AC 113 ms
94,756 KB
testcase_06 AC 110 ms
90,516 KB
testcase_07 AC 147 ms
112,908 KB
testcase_08 AC 73 ms
71,204 KB
testcase_09 AC 72 ms
71,228 KB
testcase_10 AC 71 ms
71,524 KB
testcase_11 WA -
testcase_12 AC 73 ms
71,388 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 71 ms
71,204 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 141 ms
114,628 KB
testcase_24 AC 127 ms
105,884 KB
testcase_25 AC 133 ms
110,660 KB
testcase_26 AC 152 ms
125,084 KB
testcase_27 AC 102 ms
87,772 KB
権限があれば一括ダウンロードができます

ソースコード

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+1
  elif y < x:
    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