結果

問題 No.2774 Wake up Record 2
ユーザー moon17moon17
提出日時 2024-06-07 22:56:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 93,920 KB
最終ジャッジ日時 2024-06-07 22:56:08
合計ジャッジ時間 2,343 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,456 KB
testcase_01 AC 36 ms
51,968 KB
testcase_02 AC 38 ms
51,840 KB
testcase_03 AC 38 ms
52,124 KB
testcase_04 AC 36 ms
52,352 KB
testcase_05 AC 35 ms
52,224 KB
testcase_06 AC 34 ms
52,096 KB
testcase_07 AC 34 ms
51,712 KB
testcase_08 AC 35 ms
52,352 KB
testcase_09 AC 53 ms
65,152 KB
testcase_10 AC 49 ms
59,648 KB
testcase_11 AC 81 ms
80,000 KB
testcase_12 AC 78 ms
76,544 KB
testcase_13 AC 151 ms
86,784 KB
testcase_14 AC 98 ms
93,644 KB
testcase_15 AC 101 ms
93,920 KB
testcase_16 AC 96 ms
93,824 KB
testcase_17 AC 110 ms
93,712 KB
testcase_18 AC 111 ms
92,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,*a=map(int,open(0).read().split())
def judge(x):
  s=sum(i<=x for i in a)
  return s>=k
ok,ng=10**9+1,0
while abs(ok-ng)>1:
  mid=ok+ng>>1
  if judge(mid):
    ok=mid
  else:
    ng=mid
ans=[]
for i in range(1,n):
  if a[i-1]<=ok<a[i]:
    ans+=i+1,
print(len(ans))
print(*ans)
0