結果
問題 | No.1064 ∪∩∩ / Cup Cap Cap |
ユーザー |
![]() |
提出日時 | 2020-05-29 21:46:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,367 bytes |
コンパイル時間 | 1,093 ms |
コンパイル使用メモリ | 91,136 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 03:31:26 |
合計ジャッジ時間 | 2,275 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
#include <cstdio> #include <cstring> #include <cmath> #include <utility> #include <iostream> #include <functional> #include <bitset> #include <algorithm> #include <vector> #include <forward_list> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <numeric> #include <iomanip> #define ll long long int #define pb push_back #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int mx4[] = {0,1,0,-1}; int my4[] = {1,0,-1,0}; ll INF = (1 << 30); ll MOD = 1e9 + 7; vector<int> par; vector<int> RANK; void init(int n){ for(int i = 0; i < n; i++){ par.pb(i); RANK.pb(0); }return; } int FindRoot(int x){ if(par[x] == x) return x; par[x] = FindRoot(par[x]); return par[x]; } bool isSame(int x, int y){ return FindRoot(x) == FindRoot(y); } void Union(int x, int y) { x = FindRoot(x); y = FindRoot(y); if (x == y) return; if (RANK[x] > RANK[y]) par[y] = x; else { par[x] = y; if (RANK[x] == RANK[y]) { RANK[y]++; } } return; } int main() { double a,b,c,d; cin >> a >> b >> c >> d; double D =(a-c) * (a-c) - 8 * (b - d); if(D==0){cout << "Yes" << endl; return 0;} else if(D < 0){cout << "No" << endl; return 0;} cout << fixed << setprecision(6) << (a + c) / 2 << " " << (b + d) / 2 << endl; }