結果

問題 No.1280 Beyond C
ユーザー KodaiKodai
提出日時 2020-11-16 17:12:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 931 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 24,748 KB
最終ジャッジ日時 2023-09-30 07:23:39
合計ジャッジ時間 7,142 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,860 KB
testcase_01 AC 16 ms
7,908 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 16 ms
8,032 KB
testcase_04 AC 16 ms
7,916 KB
testcase_05 AC 16 ms
7,880 KB
testcase_06 AC 16 ms
7,948 KB
testcase_07 AC 16 ms
7,968 KB
testcase_08 AC 16 ms
7,856 KB
testcase_09 AC 16 ms
7,904 KB
testcase_10 AC 16 ms
7,856 KB
testcase_11 AC 19 ms
7,860 KB
testcase_12 AC 16 ms
7,876 KB
testcase_13 AC 17 ms
7,828 KB
testcase_14 AC 18 ms
8,012 KB
testcase_15 AC 408 ms
16,756 KB
testcase_16 AC 221 ms
16,776 KB
testcase_17 AC 304 ms
17,828 KB
testcase_18 AC 865 ms
24,748 KB
testcase_19 AC 802 ms
24,656 KB
testcase_20 AC 924 ms
23,276 KB
testcase_21 AC 931 ms
23,148 KB
testcase_22 AC 919 ms
23,220 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()
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