結果

問題 No.210 探し物はどこですか?
ユーザー kotatsugamekotatsugame
提出日時 2020-03-11 06:33:21
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 619 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 812 ms
コンパイル使用メモリ 82,136 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-10 01:12:17
合計ジャッジ時間 24,800 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 160 ms
4,380 KB
testcase_01 AC 205 ms
4,376 KB
testcase_02 AC 234 ms
4,380 KB
testcase_03 AC 573 ms
4,380 KB
testcase_04 AC 570 ms
4,376 KB
testcase_05 AC 565 ms
4,380 KB
testcase_06 AC 572 ms
4,380 KB
testcase_07 AC 568 ms
4,376 KB
testcase_08 AC 517 ms
4,380 KB
testcase_09 AC 522 ms
4,376 KB
testcase_10 AC 521 ms
4,376 KB
testcase_11 AC 544 ms
4,380 KB
testcase_12 AC 547 ms
4,380 KB
testcase_13 AC 555 ms
4,380 KB
testcase_14 AC 607 ms
4,376 KB
testcase_15 AC 607 ms
4,380 KB
testcase_16 AC 602 ms
4,380 KB
testcase_17 AC 619 ms
4,376 KB
testcase_18 AC 280 ms
4,376 KB
testcase_19 AC 288 ms
4,380 KB
testcase_20 AC 312 ms
4,376 KB
testcase_21 AC 294 ms
4,376 KB
testcase_22 AC 295 ms
4,376 KB
testcase_23 AC 586 ms
4,376 KB
testcase_24 AC 599 ms
4,376 KB
testcase_25 AC 608 ms
4,380 KB
testcase_26 AC 595 ms
4,376 KB
testcase_27 AC 557 ms
4,380 KB
testcase_28 AC 430 ms
4,380 KB
testcase_29 AC 439 ms
4,376 KB
testcase_30 AC 434 ms
4,376 KB
testcase_31 AC 424 ms
4,380 KB
testcase_32 AC 429 ms
4,376 KB
testcase_33 AC 573 ms
4,380 KB
testcase_34 AC 574 ms
4,376 KB
testcase_35 AC 593 ms
4,380 KB
testcase_36 AC 577 ms
4,380 KB
testcase_37 AC 579 ms
4,376 KB
testcase_38 AC 458 ms
4,376 KB
testcase_39 AC 459 ms
4,376 KB
testcase_40 AC 454 ms
4,380 KB
testcase_41 AC 505 ms
4,380 KB
testcase_42 AC 451 ms
4,376 KB
testcase_43 AC 85 ms
4,380 KB
testcase_44 AC 132 ms
4,380 KB
testcase_45 AC 580 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:8:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-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