結果

問題 No.159 刺さらないUSB
ユーザー wing3196
提出日時 2015-03-02 00:18:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 800 ms
コンパイル使用メモリ 76,568 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 00:49:20
合計ジャッジ時間 1,376 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 8 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;

int main(){
	double P,Q,p1=0,p,p_,p1_=0,p2=0,p2_=0,s;
	cin>>P>>Q;
	p = P*Q; p_ = (1-P)*(1-Q);
	p1 = (1-p_)*P*Q; p1_ = (1-p)*(1-P)*(1-Q);
	p2 = (1-p1_)*P*Q; p2_ = (1-p1)*(1-P)*(1-Q);
	if(p1+p1_<p2+p2_) puts("YES");
	else puts("NO");
    return 0;
}
0