結果

問題 No.1280 Beyond C
ユーザー NoaSaberNoaSaber
提出日時 2021-04-02 22:35:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 97,108 KB
最終ジャッジ日時 2023-08-25 12:46:33
合計ジャッジ時間 3,638 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,564 KB
testcase_01 AC 60 ms
71,392 KB
testcase_02 AC 60 ms
71,420 KB
testcase_03 AC 61 ms
71,552 KB
testcase_04 AC 64 ms
71,388 KB
testcase_05 AC 60 ms
71,108 KB
testcase_06 AC 60 ms
71,260 KB
testcase_07 AC 59 ms
71,368 KB
testcase_08 AC 58 ms
71,404 KB
testcase_09 AC 59 ms
71,428 KB
testcase_10 AC 59 ms
71,432 KB
testcase_11 AC 69 ms
76,392 KB
testcase_12 AC 61 ms
71,108 KB
testcase_13 AC 69 ms
76,640 KB
testcase_14 AC 70 ms
76,696 KB
testcase_15 AC 138 ms
90,804 KB
testcase_16 AC 114 ms
88,312 KB
testcase_17 AC 132 ms
91,340 KB
testcase_18 AC 125 ms
95,712 KB
testcase_19 AC 127 ms
95,664 KB
testcase_20 AC 195 ms
97,104 KB
testcase_21 AC 205 ms
96,948 KB
testcase_22 AC 209 ms
97,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N,M,C=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
ans=0
def is_ok(arg):
    return arg*i>C
def m_bisect(ng, ok):
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok
for i in a:
    tmp=m_bisect(0,10**9+1) 
    ans+=len(b)-bisect.bisect_left(b,tmp)
print(ans/len(a)/len(b))
0