結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2020-11-06 23:42:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 162 ms / 2,000 ms |
コード長 | 551 bytes |
コンパイル時間 | 239 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 96,092 KB |
最終ジャッジ日時 | 2024-07-22 13:48:01 |
合計ジャッジ時間 | 2,871 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) N,M,C=MI() A=LI() B=LI() A.sort() B.sort() def count(a): # a*biがCを超えるようなbiの個数を求める ng=-1 ok=M while ok-ng>1: med=(ok+ng)//2 if B[med]*a>C: ok=med else: ng=med # print(a,M-ok) return M-ok import bisect ans=0 for i in range(N): a=A[i] ans+=count(a) ans=ans/(N*M) print(ans)