結果

問題 No.1280 Beyond C
ユーザー realDivineJKrealDivineJK
提出日時 2020-11-06 21:53:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 526 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 96,512 KB
最終ジャッジ日時 2023-09-29 18:39:18
合計ジャッジ時間 4,120 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,248 KB
testcase_01 AC 63 ms
71,416 KB
testcase_02 AC 61 ms
71,616 KB
testcase_03 AC 62 ms
71,304 KB
testcase_04 AC 60 ms
71,480 KB
testcase_05 AC 62 ms
71,212 KB
testcase_06 AC 64 ms
71,476 KB
testcase_07 AC 63 ms
71,060 KB
testcase_08 AC 63 ms
71,320 KB
testcase_09 AC 62 ms
71,492 KB
testcase_10 AC 63 ms
71,204 KB
testcase_11 AC 74 ms
77,008 KB
testcase_12 AC 64 ms
71,216 KB
testcase_13 AC 68 ms
76,548 KB
testcase_14 AC 71 ms
76,704 KB
testcase_15 AC 131 ms
90,636 KB
testcase_16 AC 104 ms
88,712 KB
testcase_17 AC 124 ms
91,256 KB
testcase_18 AC 112 ms
94,656 KB
testcase_19 AC 101 ms
94,624 KB
testcase_20 AC 185 ms
96,360 KB
testcase_21 AC 188 ms
96,356 KB
testcase_22 AC 192 ms
96,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, C = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cnt = 0
B.sort()
for i in range(N):
    if A[i] * B[0] > C:
        cnt += 0
    elif A[i] * B[-1] <= C:
        cnt += M
    else:
        l, r = 0, M
        d = (l + r) // 2
        for j in range(len(bin(M))):
            if A[i] * B[d] <= C:
                l = d
                d = (l + r) // 2
            else:
                r = d
                d = (l + r) // 2
        cnt += d + 1
print((N*M-cnt)/(N*M))
0