結果

問題 No.210 探し物はどこですか?
ユーザー kotatsugamekotatsugame
提出日時 2020-03-11 06:33:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 567 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 81,852 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-27 19:04:46
合計ジャッジ時間 20,803 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
6,816 KB
testcase_01 AC 178 ms
6,940 KB
testcase_02 AC 194 ms
6,944 KB
testcase_03 AC 491 ms
6,944 KB
testcase_04 AC 486 ms
6,940 KB
testcase_05 AC 487 ms
6,940 KB
testcase_06 AC 507 ms
6,944 KB
testcase_07 AC 567 ms
6,940 KB
testcase_08 AC 439 ms
6,940 KB
testcase_09 AC 454 ms
6,940 KB
testcase_10 AC 451 ms
6,940 KB
testcase_11 AC 476 ms
6,944 KB
testcase_12 AC 474 ms
6,940 KB
testcase_13 AC 480 ms
6,940 KB
testcase_14 AC 517 ms
6,940 KB
testcase_15 AC 519 ms
6,940 KB
testcase_16 AC 510 ms
6,944 KB
testcase_17 AC 525 ms
6,940 KB
testcase_18 AC 235 ms
6,940 KB
testcase_19 AC 242 ms
6,944 KB
testcase_20 AC 262 ms
6,940 KB
testcase_21 AC 246 ms
6,940 KB
testcase_22 AC 249 ms
6,940 KB
testcase_23 AC 500 ms
6,944 KB
testcase_24 AC 515 ms
6,940 KB
testcase_25 AC 515 ms
6,940 KB
testcase_26 AC 506 ms
6,940 KB
testcase_27 AC 470 ms
6,944 KB
testcase_28 AC 364 ms
6,944 KB
testcase_29 AC 365 ms
6,940 KB
testcase_30 AC 359 ms
6,940 KB
testcase_31 AC 356 ms
6,940 KB
testcase_32 AC 360 ms
6,944 KB
testcase_33 AC 485 ms
6,940 KB
testcase_34 AC 497 ms
6,940 KB
testcase_35 AC 529 ms
6,940 KB
testcase_36 AC 505 ms
6,944 KB
testcase_37 AC 494 ms
6,944 KB
testcase_38 AC 388 ms
6,944 KB
testcase_39 AC 390 ms
6,940 KB
testcase_40 AC 385 ms
6,944 KB
testcase_41 AC 389 ms
6,944 KB
testcase_42 AC 382 ms
6,944 KB
testcase_43 AC 74 ms
6,940 KB
testcase_44 AC 113 ms
6,944 KB
testcase_45 AC 496 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<queue>
#include<iomanip>
using namespace std;
int N;
int p[1000],q[1000];
double ans;
main()
{
	cin>>N;
	for(int i=0;i<N;i++)cin>>p[i];
	for(int i=0;i<N;i++)cin>>q[i];
	priority_queue<pair<double,double> >P;
	for(int i=0;i<N;i++)
	{
		P.push(make_pair(p[i]*q[i]/1e5,q[i]/1e2));
	}
	for(int i=1;i<=4e6;i++)
	{
		pair<double,double>a=P.top();P.pop();
		ans+=i*a.first;
		a.first*=1-a.second;
		P.push(a);
	}
	cout<<fixed<<setprecision(16)<<ans<<endl;
}
0