結果

問題 No.1280 Beyond C
ユーザー ああいいああいい
提出日時 2021-12-27 19:39:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 483 ms / 2,000 ms
コード長 437 bytes
コンパイル時間 404 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 26,580 KB
最終ジャッジ日時 2024-04-08 12:58:57
合計ジャッジ時間 4,360 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,984 KB
testcase_01 AC 31 ms
9,984 KB
testcase_02 AC 30 ms
9,984 KB
testcase_03 AC 33 ms
9,984 KB
testcase_04 AC 30 ms
9,984 KB
testcase_05 AC 30 ms
9,984 KB
testcase_06 AC 30 ms
9,984 KB
testcase_07 AC 31 ms
9,984 KB
testcase_08 AC 29 ms
9,984 KB
testcase_09 AC 30 ms
9,984 KB
testcase_10 AC 31 ms
9,984 KB
testcase_11 AC 32 ms
10,112 KB
testcase_12 AC 31 ms
10,112 KB
testcase_13 AC 31 ms
10,112 KB
testcase_14 AC 31 ms
10,112 KB
testcase_15 AC 220 ms
18,900 KB
testcase_16 AC 105 ms
18,700 KB
testcase_17 AC 181 ms
19,740 KB
testcase_18 AC 128 ms
26,580 KB
testcase_19 AC 377 ms
26,580 KB
testcase_20 AC 477 ms
25,112 KB
testcase_21 AC 476 ms
25,112 KB
testcase_22 AC 483 ms
25,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,C = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

a.sort()
b.sort()

def tansaku(x):
    if x * b[-1] <= C:
        return M
    end = M-1
    start = -1
    while end - start > 1:
        mid = (start + end) // 2
        if x * b[mid] > C:
            end = mid
        else:
            start = mid
    return end
ans = 0
for i in a:
    ans += M - tansaku(i)
print(ans / (N * M))
0