結果

問題 No.2774 Wake up Record 2
ユーザー shimon
提出日時 2024-06-09 20:33:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 96,128 KB
最終ジャッジ日時 2024-12-30 21:32:32
合計ジャッジ時間 3,063 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
A = list(map(int, input().split()))
B = sorted(A)
threshold = B[k - 1]
ans = []
for i in range(n - 1):
    if A[i] <= threshold and A[i + 1] > threshold:
        ans.append(i + 2)
print(len(ans))
print(*ans)
0