結果

問題 No.2210 equence Squence Seuence
ユーザー shobonvip
提出日時 2023-02-10 21:41:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 141,404 KB
最終ジャッジ日時 2024-07-07 15:54:00
合計ジャッジ時間 4,206 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = list(map(int,input().split()))
v = []
w = []
for i in range(n-1):
	if a[i] < a[i+1]:
		w.append(i)
	else:
		v.append(i)

r = v + [n-1] + w[::-1]
ans = []
for i in range(n):
	if r[k-1] == i: continue
	ans.append(a[i])
print(*ans)
0