結果
問題 | No.2774 Wake up Record 2 |
ユーザー |
|
提出日時 | 2024-06-07 21:29:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 103 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 102,016 KB |
最終ジャッジ日時 | 2024-12-26 07:03:43 |
合計ジャッジ時間 | 2,065 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)