結果

問題 No.2210 equence Squence Seuence
ユーザー flygonflygon
提出日時 2023-02-10 21:43:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 345 bytes
コンパイル時間 755 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 124,848 KB
最終ジャッジ日時 2023-09-21 22:50:25
合計ジャッジ時間 5,715 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,120 KB
testcase_01 AC 82 ms
70,828 KB
testcase_02 AC 81 ms
71,120 KB
testcase_03 AC 113 ms
85,560 KB
testcase_04 WA -
testcase_05 AC 126 ms
94,644 KB
testcase_06 AC 119 ms
90,724 KB
testcase_07 AC 158 ms
112,684 KB
testcase_08 AC 82 ms
71,268 KB
testcase_09 AC 82 ms
71,248 KB
testcase_10 AC 80 ms
71,300 KB
testcase_11 WA -
testcase_12 AC 87 ms
71,068 KB
testcase_13 AC 178 ms
107,164 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 168 ms
107,108 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 80 ms
71,124 KB
testcase_20 AC 81 ms
71,296 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 150 ms
114,444 KB
testcase_24 AC 138 ms
105,784 KB
testcase_25 AC 145 ms
110,272 KB
testcase_26 AC 162 ms
124,848 KB
testcase_27 AC 113 ms
87,536 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
  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