結果

問題 No.1280 Beyond C
ユーザー 炭酸水炭酸水
提出日時 2022-05-19 19:08:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 26,608 KB
最終ジャッジ日時 2023-10-19 03:07:45
合計ジャッジ時間 5,918 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,056 KB
testcase_01 AC 31 ms
10,056 KB
testcase_02 AC 30 ms
10,056 KB
testcase_03 AC 32 ms
10,056 KB
testcase_04 AC 30 ms
10,056 KB
testcase_05 AC 31 ms
10,056 KB
testcase_06 AC 31 ms
10,056 KB
testcase_07 AC 31 ms
10,056 KB
testcase_08 AC 30 ms
10,056 KB
testcase_09 AC 30 ms
10,056 KB
testcase_10 AC 30 ms
10,056 KB
testcase_11 AC 33 ms
10,156 KB
testcase_12 AC 31 ms
10,084 KB
testcase_13 AC 31 ms
10,168 KB
testcase_14 AC 35 ms
10,164 KB
testcase_15 AC 268 ms
18,700 KB
testcase_16 AC 158 ms
18,572 KB
testcase_17 AC 215 ms
19,624 KB
testcase_18 AC 450 ms
26,524 KB
testcase_19 WA -
testcase_20 AC 579 ms
25,016 KB
testcase_21 AC 552 ms
25,016 KB
testcase_22 AC 575 ms
25,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, c = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
b.sort()

def nibutan_max(a, L, R, x):
    while L <= R:
        M = (L + R) // 2
        if a[M] <= x:
            L = M + 1
        elif x < a[M]:
            R = M - 1
    return R

ans = 0
for x in a:
    y = nibutan_max(b, 0, len(b) - 1, c / x)
    if y == 0 and x * b[0] > c:
        ans += len(b)
    elif y == 0:
        ans += len(b) - 1
    else:
        ans += len(b) - y - 1

print(ans/ (n * m))
0