結果

問題 No.210 探し物はどこですか?
ユーザー 唐澤貴洋唐澤貴洋
提出日時 2015-10-15 22:29:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 841 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 69,788 KB
実行使用メモリ 6,056 KB
最終ジャッジ日時 2023-09-28 21:51:20
合計ジャッジ時間 13,021 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
5,920 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 255 ms
5,872 KB
testcase_04 AC 201 ms
6,016 KB
testcase_05 AC 92 ms
5,916 KB
testcase_06 AC 79 ms
6,032 KB
testcase_07 AC 179 ms
5,872 KB
testcase_08 AC 11 ms
5,876 KB
testcase_09 AC 11 ms
5,888 KB
testcase_10 AC 11 ms
6,012 KB
testcase_11 AC 11 ms
5,972 KB
testcase_12 AC 11 ms
5,928 KB
testcase_13 AC 62 ms
5,984 KB
testcase_14 AC 89 ms
5,916 KB
testcase_15 AC 64 ms
6,032 KB
testcase_16 AC 60 ms
5,996 KB
testcase_17 AC 656 ms
5,992 KB
testcase_18 AC 63 ms
5,876 KB
testcase_19 AC 62 ms
5,884 KB
testcase_20 AC 63 ms
5,888 KB
testcase_21 AC 64 ms
5,880 KB
testcase_22 AC 62 ms
5,976 KB
testcase_23 AC 245 ms
5,876 KB
testcase_24 AC 245 ms
5,948 KB
testcase_25 AC 245 ms
5,920 KB
testcase_26 AC 242 ms
5,916 KB
testcase_27 AC 243 ms
5,868 KB
testcase_28 AC 239 ms
6,004 KB
testcase_29 AC 238 ms
5,944 KB
testcase_30 AC 239 ms
5,872 KB
testcase_31 AC 239 ms
5,916 KB
testcase_32 AC 239 ms
6,000 KB
testcase_33 AC 470 ms
6,036 KB
testcase_34 AC 471 ms
5,916 KB
testcase_35 AC 470 ms
5,916 KB
testcase_36 AC 471 ms
5,928 KB
testcase_37 AC 471 ms
6,036 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 6 ms
5,888 KB
testcase_44 AC 10 ms
5,912 KB
testcase_45 AC 216 ms
6,036 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
#define SHIKOU 300000
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[SHIKOU];
double ans;
int main() {
	D t;
	cin >> a;
	for (i = 0; i < a; i++) {
		cin >> p[i];
		p[i] /= 1000.0;
	}
	for (i = 0; i < a; i++) {
		cin >> q[i];
		q[i] /= 100.0;
	}
	for (i = 0; i < SHIKOU; 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.0 - q[b];
	}
	for (i = 0; i < SHIKOU; i++)
		ans += (double)i*kitai[i];
	printf("%.6f\n", ans+1);
}
0