結果
問題 | No.2210 equence Squence Seuence |
ユーザー |
|
提出日時 | 2022-11-25 05:44:13 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 404 ms |
コンパイル使用メモリ | 82,148 KB |
実行使用メモリ | 140,324 KB |
最終ジャッジ日時 | 2024-10-05 03:50:57 |
合計ジャッジ時間 | 5,048 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 6 WA * 19 |
ソースコード
def solve(n, k, p): top = [] bottom = [] p.append(0) for i in range(n): if p[i] < p[i + 1]: top.append(i) else: bottom.append(i) q = top + bottom[::-1] ind = q[k - 1] ans = [] for i in range(n): if i == ind: continue ans.append(p[i]) p.pop() return ans n, k = map(int,input().split()) p = list(map(int,input().split())) print(*solve(n, k, p))