結果

問題 No.210 探し物はどこですか?
ユーザー sugim48sugim48
提出日時 2015-05-15 23:47:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,044 bytes
コンパイル時間 1,506 ms
コンパイル使用メモリ 76,944 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-20 08:45:24
合計ジャッジ時間 9,515 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
4,380 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 180 ms
4,380 KB
testcase_04 AC 128 ms
4,380 KB
testcase_05 AC 53 ms
4,376 KB
testcase_06 AC 50 ms
4,380 KB
testcase_07 AC 116 ms
4,376 KB
testcase_08 AC 6 ms
4,376 KB
testcase_09 AC 6 ms
4,376 KB
testcase_10 AC 6 ms
4,380 KB
testcase_11 AC 6 ms
4,376 KB
testcase_12 AC 6 ms
4,376 KB
testcase_13 AC 39 ms
4,380 KB
testcase_14 AC 40 ms
4,376 KB
testcase_15 AC 40 ms
4,380 KB
testcase_16 AC 39 ms
4,380 KB
testcase_17 AC 41 ms
4,380 KB
testcase_18 AC 41 ms
4,376 KB
testcase_19 AC 40 ms
4,376 KB
testcase_20 AC 40 ms
4,380 KB
testcase_21 AC 41 ms
4,380 KB
testcase_22 AC 40 ms
4,380 KB
testcase_23 AC 160 ms
4,376 KB
testcase_24 AC 161 ms
4,376 KB
testcase_25 AC 161 ms
4,376 KB
testcase_26 AC 160 ms
4,380 KB
testcase_27 AC 161 ms
4,380 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 310 ms
4,380 KB
testcase_34 AC 311 ms
4,376 KB
testcase_35 AC 309 ms
4,376 KB
testcase_36 AC 315 ms
4,376 KB
testcase_37 AC 311 ms
4,376 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 5 ms
4,380 KB
testcase_45 AC 161 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int main() {
	int n; cin >> n;
	vector<double> p(n), q(n);
	for (int i = 0; i < n; i++) {
		cin >> p[i];
		p[i] /= 1000;
	}
	for (int i = 0; i < n; i++) {
		cin >> q[i];
		q[i] /= 100;
	}
	double e = 0;
	for (int t = 1; t <= 200000; t++) {
		int _i = 0;
		for (int i = 0; i < n; i++)
			if (p[i] * q[i] > p[_i] * q[_i])
				_i = i;
		e += p[_i] * q[_i] * t;
		p[_i] *= 1 - q[_i];
	}
	cout << e << endl;
}
0