結果

問題 No.1280 Beyond C
ユーザー leaf_1415leaf_1415
提出日時 2020-11-06 23:00:17
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 933 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 76,388 KB
実行使用メモリ 5,208 KB
最終ジャッジ日時 2023-09-29 19:26:46
合計ジャッジ時間 2,553 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 3 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 51 ms
4,432 KB
testcase_16 AC 41 ms
4,388 KB
testcase_17 AC 50 ms
4,420 KB
testcase_18 AC 87 ms
5,164 KB
testcase_19 AC 86 ms
5,172 KB
testcase_20 AC 94 ms
5,008 KB
testcase_21 AC 94 ms
5,204 KB
testcase_22 AC 95 ms
5,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define all(x) (x).begin(),(x).end()
#define inf 1e18

using namespace std;

typedef long long llint;
typedef pair<llint, llint> P;

llint n, m, c;
llint a[100005], b[100005];

int main(void)
{
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	
	cin >> n >> m >> c;
	rep(i, 1, n) cin >> a[i];
	rep(i, 1, m) cin >> b[i];
	sort(b+1, b+m+1);
	
	llint ans = 0;
	rep(i, 1, n){
		llint p = upper_bound(b+1, b+m+1, c/a[i]) - b;
		ans += m - p + 1;
	}
	printf("%.11f\n", (double)ans/(n*m));
	
	return 0;
}
0