結果

問題 No.1280 Beyond C
ユーザー ygd.ygd.
提出日時 2020-11-06 21:41:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 1,195 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 96,056 KB
最終ジャッジ日時 2023-09-29 18:28:37
合計ジャッジ時間 3,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,620 KB
testcase_01 AC 66 ms
71,988 KB
testcase_02 AC 67 ms
71,768 KB
testcase_03 AC 67 ms
71,584 KB
testcase_04 AC 66 ms
71,748 KB
testcase_05 AC 66 ms
71,884 KB
testcase_06 AC 68 ms
71,752 KB
testcase_07 AC 66 ms
71,608 KB
testcase_08 AC 66 ms
71,920 KB
testcase_09 AC 65 ms
71,868 KB
testcase_10 AC 68 ms
71,532 KB
testcase_11 AC 74 ms
76,868 KB
testcase_12 AC 68 ms
71,472 KB
testcase_13 AC 74 ms
76,900 KB
testcase_14 AC 74 ms
77,100 KB
testcase_15 AC 119 ms
93,232 KB
testcase_16 AC 114 ms
90,752 KB
testcase_17 AC 116 ms
94,240 KB
testcase_18 AC 117 ms
94,808 KB
testcase_19 AC 133 ms
96,056 KB
testcase_20 AC 160 ms
95,536 KB
testcase_21 AC 158 ms
95,636 KB
testcase_22 AC 156 ms
95,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N,M,C = map(int,input().split()); Error = pow(10,-9); INF = float("inf")
A = list(map(int,input().split()))
B = list(map(int,input().split()))
B = [-INF] + B + [INF]
B.sort()
ALL = N*M
cnt = 0
for i in range(N):
  ok = M+1
  ng = 0
  while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if B[mid]*A[i] > C:
      ok = mid
    else:
      ng = mid
  cnt += M+1 - ok
#print(cnt)
ans = cnt/ALL
print(ans)
0