結果

問題 No.1280 Beyond C
コンテスト
ユーザー Kodai
提出日時 2020-11-16 17:12:22
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 664 ms / 2,000 ms
+ 935µs
コード長 439 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 67 ms
コンパイル使用メモリ 14,720 KB
実行使用メモリ 25,808 KB
最終ジャッジ日時 2026-10-14 11:03:51
合計ジャッジ時間 6,549 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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
for a in A:
    left = 0
    right = len(B) - 1
    mid = 0
    while right >= left:
        mid = left + (right - left) // 2
        if B[mid] * a > c:
            right = mid - 1
        else:
            left = mid + 1
    mid = left + (right - left) // 2
    ans += m - (mid + 1)

print(ans / (n * m))
0