結果
| 問題 | 
                            No.8001 確率論ってこういうものですよね
                             | 
                    
| コンテスト | |
| ユーザー | 
                             imgry22
                         | 
                    
| 提出日時 | 2014-12-26 00:10:20 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,053 bytes | 
| コンパイル時間 | 1,324 ms | 
| コンパイル使用メモリ | 159,132 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-12 23:39:44 | 
| 合計ジャッジ時間 | 1,777 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 4 WA * 6 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }
#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9
double x, y;
int main()
{
  cin >> x >> y;
  if(x < EPS || 1-y < EPS) puts("0 0");
  else printf("%.10f %.10f\n", abs(min(1.0, x)   - 1.0) < EPS ? 1 : min(1.0, x)/(x*(1-y)),
                               abs(max(0.0, x-y) - 0.0) < EPS ? 0 : max(0.0, x-y)/(x*(1-y)));
  return 0;
}
            
            
            
        
            
imgry22