結果
| 問題 | No.2774 Wake up Record 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 21:29:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 2,000 ms |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 106,880 KB |
| 最終ジャッジ日時 | 2026-06-01 03:58:48 |
| 合計ジャッジ時間 | 1,944 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
# 元気度 ok 以下で時間が K 以上になるときの ok の最小値を求める
N,K=map(int,input().split())
A=list(map(int,input().split()))
new_A = sorted(A)
pivot=new_A[K-1]
S=[]
for i in range(len(A)):
if A[i]<=pivot:
S.append("o")
else:
S.append("x")
ans=[]
for i in range(len(S)-1):
if S[i]=="o" and S[i+1]=="x":
ans.append(i+2)
print(len(ans))
print(*ans)