結果

問題 No.453 製薬会社
ユーザー chocoruskchocorusk
提出日時 2018-12-21 15:17:45
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 622 bytes
コンパイル時間 1,395 ms
コンパイル使用メモリ 95,592 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-26 01:26:45
合計ジャッジ時間 1,602 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	double p1=0, p2=5000;
	double c, d; cin>>c>>d;
	for(int t=0; t<100; t++){
		double p=(p1+p2)/2;
		if(max(0.0, 14*(3*p/4-c)/17)<=min(p/2, 14*(d-p/4)/3)) p1=p;
		else p2=p;
	}
	printf("%.7lf\n", p1*1000);
	return 0;
}
0