結果
問題 |
No.1064 ∪∩∩ / Cup Cap Cap
|
ユーザー |
|
提出日時 | 2020-05-29 21:36:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,363 bytes |
コンパイル時間 | 1,889 ms |
コンパイル使用メモリ | 167,048 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 02:46:38 |
合計ジャッジ時間 | 2,636 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
#include <bits/stdc++.h> using namespace std; template <class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return 1; } return 0; } void print() { cout << "\n"; } template <class T> void print(const T &x) { cout << x << "\n"; } template <class T, class... Args> void print(const T &x, const Args &... args) { cout << x << " "; print(args...); } template <class T> void printVector(const vector<T> &v) { for(const T &x : v) { cout << x << " "; } cout << "\n"; } using ll = long long; #define ALL(v) (v).begin(), (v).end() #define RALL(v) (v).rbegin(), (v).rend() const double EPS = 1e-7; const int INF = 1 << 30; const ll LLINF = 1LL << 60; const double PI = acos(-1); constexpr int MOD = 1000000007; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; //------------------------------------- using ld = long double; int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(15); ll a, b, c, d; cin >> a >> b >> c >> d; ll D = (a - c) * (a - c) - 8 * (b - d); if(D < 0) { print("No"); } else if(D == 0) { print("Yes"); } else { print((ld)(a + c) / 2, (ld)(b + d) / 2); } }