結果

問題 No.3758 Fan Meeting
コンテスト
ユーザー 昼のご飯
提出日時 2026-10-09 21:50:25
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 265 ms / 2,000 ms
+ 544µs
コード長 250 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 62 ms
コンパイル使用メモリ 83,124 KB
実行使用メモリ 302,856 KB
最終ジャッジ日時 2026-10-09 21:50:33
合計ジャッジ時間 6,829 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 47
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, S = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
L, R = 1, A[0]

while L < R:
    M = (L + R) // 2
    B = [i for i in A if i > M]

    if sum(B[::M]) < S:
        R = M
    else:
        L = M + 1

print(L)
0