結果

問題 No.1280 Beyond C
コンテスト
ユーザー nehan_der_thal
提出日時 2020-11-06 22:15:21
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 106 ms / 2,000 ms
+ 985µs
コード長 476 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,220 ms
コンパイル使用メモリ 64,916 KB
実行使用メモリ 82,456 KB
最終ジャッジ日時 2026-10-14 11:00:00
合計ジャッジ時間 4,132 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

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