結果
| 問題 | No.1064 ∪∩∩ / Cup Cap Cap |
| コンテスト | |
| ユーザー |
scol_kp
|
| 提出日時 | 2020-05-29 21:48:29 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,120 bytes |
| 記録 | |
| コンパイル時間 | 1,277 ms |
| コンパイル使用メモリ | 211,016 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-10 08:49:26 |
| 合計ジャッジ時間 | 2,772 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
#define FASTIO
using namespace std;
using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
constexpr int I_INF = numeric_limits<int>::max();
constexpr ll L_INF = numeric_limits<ll>::max();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void solve() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll D = (a - c) * (a - c) - 8 * (b - d);
if (D < 0) {
cout << "No\n";
}
else if (D == 0) {
cout << "Yes\n";
}
else {
double p = (a + c) / 2.0;
double q = (b + d) / 2.0;
cout << setprecision(20) << p << " " << q << "\n";
}
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
int main() {
#ifdef FASTIO
cin.tie(0), cout.tie(0);
ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
ifstream ifs("./in_out/input.txt");
cin.rdbuf(ifs.rdbuf());
#endif
#ifdef FILEOUTPUT
ofstream ofs("./in_out/output.txt");
cout.rdbuf(ofs.rdbuf());
#endif
solve();
cout << flush;
return 0;
}
scol_kp