結果
| 問題 | No.1064 ∪∩∩ / Cup Cap Cap | 
| コンテスト | |
| ユーザー |  queee | 
| 提出日時 | 2020-05-29 22:43:30 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,303 bytes | 
| コンパイル時間 | 1,347 ms | 
| コンパイル使用メモリ | 91,220 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-06 06:37:27 | 
| 合計ジャッジ時間 | 2,579 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 2 | 
| other | AC * 22 WA * 14 | 
ソースコード
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <functional>
#define DB puts("D")
#define pb push_back
using namespace std; using ll=long long; using ld=long double; const int INF=1e9; const ll LINF=1e18;
template<typename T, typename U, typename O> void caut(T a, U b, O c){cout<<"("<<a<<","<<b<<","<<c<<") ";}
template<typename T, typename U> void caut(T a, U b){cout<<"("<<a<<","<<b<<") ";}
template<typename T> void caut(T a){cout<<"("<<a<<") ";}
void input(int a[], int n){for(int i=0;i<n;i++) cin>>a[i];}
using P=pair<ll,ll>;
const ll M = 1e9+7;
int main() {
  // 2x2 + (a-c)x + b-d = 0;
  // D=(a-c)^2 - 4*2*(b-d)
  ld a,b,c,d; cin>>a>>b>>c>>d;
  ld A=2, B=a-c, C=b-d;
  ld D = B*B-4*A*C;
  if (abs(D) < 1e-5) {
    cout<<"Yes"<<endl;
  } else if (D>0) {
    cout<<A<<" "<<B<<" "<<C<<endl;
    ld x1 = (-B-sqrt(B*B-4*A*C))/2/A;
    ld x2 = (-B+sqrt(B*B-4*A*C))/2/A;
    ld y1 = x1*x1 + a*x1 + b;
    ld y2 = x2*x2 + a*x2 + b;
    cout<<x1<<" "<<x2<<" "<<y1<<" "<<y2<<endl;
    ld p = (y2-y1)/(x2-x1);
    // y-y1 = p(x-x1) : y = px - px1 + y1
    ld q = -p*x1 + y1;
    cout.precision(10);
    cout<<p<<" "<<q<<endl;
  } else {
    cout<<"No"<<endl;
  }
}
            
            
            
        