結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー Jalil Sami Sajid
提出日時 2020-05-29 22:08:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 661 bytes
コンパイル時間 1,511 ms
コンパイル使用メモリ 166,044 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-06 05:01:09
合計ジャッジ時間 2,662 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define endl '\n'
#define ll long long
using namespace std;


void lok(){
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    double a,b,c,d;
    cin>>a>>b>>c>>d;
    double e=a-c;
    double f=b-d;
    double delt=e*e-8*f;
    if(delt<0){
    	cout<<"No"<<endl;
    }
    else if(delt==0){
    	cout<<"Yes"<<endl;
    }
    else{
    	double lop=sqrt(delt);
    	double awal=(-e-lop)/4;
    	double tani=(-e+lop)/4;
    	double igreg=awal*awal+a*awal+b;
    	double tabto=tani*tani+a*tani+b;
    	double moa=(tabto-igreg)/(tani-awal);
    	double bib=tabto-(tani*moa);

    	cout<<moa<<' '<<bib<<endl;
    }

	return 0;
}
0