結果

問題 No.2210 equence Squence Seuence
ユーザー flygonflygon
提出日時 2023-02-10 22:19:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 114,620 KB
最終ジャッジ日時 2023-09-21 23:35:16
合計ジャッジ時間 5,411 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,392 KB
testcase_01 AC 68 ms
71,436 KB
testcase_02 AC 68 ms
71,260 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 113 ms
91,008 KB
testcase_07 AC 146 ms
112,812 KB
testcase_08 WA -
testcase_09 AC 70 ms
71,640 KB
testcase_10 AC 69 ms
71,244 KB
testcase_11 AC 73 ms
71,240 KB
testcase_12 AC 72 ms
71,108 KB
testcase_13 AC 161 ms
107,520 KB
testcase_14 AC 164 ms
107,528 KB
testcase_15 AC 167 ms
107,584 KB
testcase_16 AC 164 ms
107,360 KB
testcase_17 WA -
testcase_18 AC 70 ms
71,256 KB
testcase_19 AC 70 ms
71,420 KB
testcase_20 WA -
testcase_21 AC 74 ms
71,556 KB
testcase_22 WA -
testcase_23 AC 143 ms
114,620 KB
testcase_24 AC 132 ms
106,552 KB
testcase_25 AC 141 ms
110,364 KB
testcase_26 AC 154 ms
107,060 KB
testcase_27 AC 111 ms
88,048 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