結果

問題 No.210 探し物はどこですか?
ユーザー 唐澤貴洋唐澤貴洋
提出日時 2015-10-15 22:24:34
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 810 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 69,868 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-28 21:50:46
合計ジャッジ時間 3,216 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 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,376 KB
testcase_14 AC 4 ms
4,376 KB
testcase_15 AC 3 ms
4,380 KB
testcase_16 AC 4 ms
4,380 KB
testcase_17 AC 4 ms
4,380 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 1 ms
4,376 KB
testcase_44 AC 2 ms
4,376 KB
testcase_45 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<bitset>
#include<array>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<numeric>
#define D long long
#define U unsigned
using namespace std;
D n, m,a, b, d, e, x, y, z;
D i, j, k;
char c,f;
string s;
double p[1000], q[1000];
double kitai[10000];
double ans;
int main() {
	D t;
	cin >> a;
	for (i = 0; i < a; i++) {
		cin >> p[i];
		p[i] /= 1000;
	}
	for (i = 0; i < a; i++) {
		cin >> q[i];
		q[i] /= 100;
	}
	for (i = 0; i < 10000; i++) {
		b = 0;
		for (j = 1; j < a; j++) {
			if (p[j]*q[j] > p[b]*q[b])
				b = j;
		}
		kitai[i] +=(p[b] * q[b]);
		p[b] *=1 - q[b];
	}
	for (i = 0; i < 10000; i++)
		ans += (double)i*kitai[i];
	printf("%.6f\n", ans+1);
}
0