結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,440 KB
testcase_01 AC 73 ms
71,260 KB
testcase_02 AC 72 ms
71,288 KB
testcase_03 AC 101 ms
85,704 KB
testcase_04 WA -
testcase_05 AC 115 ms
94,800 KB
testcase_06 AC 109 ms
90,948 KB
testcase_07 AC 145 ms
112,948 KB
testcase_08 AC 72 ms
71,444 KB
testcase_09 AC 71 ms
71,516 KB
testcase_10 AC 71 ms
71,408 KB
testcase_11 WA -
testcase_12 AC 70 ms
71,068 KB
testcase_13 AC 157 ms
107,640 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 164 ms
107,260 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 76 ms
71,472 KB
testcase_20 AC 74 ms
71,412 KB
testcase_21 AC 75 ms
71,236 KB
testcase_22 WA -
testcase_23 AC 146 ms
115,096 KB
testcase_24 AC 129 ms
106,176 KB
testcase_25 AC 137 ms
110,848 KB
testcase_26 AC 155 ms
125,120 KB
testcase_27 AC 102 ms
87,880 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