結果

問題 No.2210 equence Squence Seuence
ユーザー flygonflygon
提出日時 2023-02-10 23:01:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 125,000 KB
最終ジャッジ日時 2023-09-22 00:09:27
合計ジャッジ時間 6,391 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,360 KB
testcase_01 AC 85 ms
71,284 KB
testcase_02 AC 85 ms
71,320 KB
testcase_03 AC 115 ms
85,816 KB
testcase_04 WA -
testcase_05 AC 125 ms
94,976 KB
testcase_06 AC 120 ms
90,852 KB
testcase_07 AC 159 ms
112,864 KB
testcase_08 AC 83 ms
71,200 KB
testcase_09 AC 81 ms
71,144 KB
testcase_10 AC 82 ms
71,392 KB
testcase_11 WA -
testcase_12 AC 81 ms
71,288 KB
testcase_13 AC 176 ms
107,432 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 175 ms
107,324 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 81 ms
71,272 KB
testcase_20 AC 82 ms
71,440 KB
testcase_21 AC 82 ms
71,136 KB
testcase_22 WA -
testcase_23 AC 159 ms
115,044 KB
testcase_24 AC 141 ms
106,196 KB
testcase_25 AC 152 ms
110,856 KB
testcase_26 AC 167 ms
125,000 KB
testcase_27 AC 116 ms
88,080 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 = 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