結果

問題 No.1280 Beyond C
コンテスト
ユーザー nehan_der_thal
提出日時 2020-11-06 22:15:21
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 476 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 139 ms
コンパイル使用メモリ 85,520 KB
実行使用メモリ 111,188 KB
最終ジャッジ日時 2026-04-03 09:09:55
合計ジャッジ時間 2,145 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def bsearch(mn, mx, func):
    #func(i)=False を満たす最大のi (mn<=i<mx)
    idx = (mx + mn)//2
    while mx-mn>1:
        if func(idx):
            idx, mx = (idx + mn)//2, idx
            continue
        idx, mn = (idx + mx)//2, idx
    return idx
N, M, C = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Y.sort()
b =R = 0
for x in X:
    i = bsearch(-1, M, lambda t: Y[t]*x > C)
    R += M-i-1
    b+=M
print(R/b)
0