結果

問題 No.1280 Beyond C
コンテスト
ユーザー nehan_der_thal
提出日時 2020-11-06 22:15:21
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 131 ms / 2,000 ms
+ 970µs
コード長 476 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 252 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 114,176 KB
最終ジャッジ日時 2026-08-23 07:27:05
合計ジャッジ時間 3,814 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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