結果
| 問題 |
No.1944 ∞
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 23:47:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 837 bytes |
| コンパイル時間 | 2,119 ms |
| コンパイル使用メモリ | 197,828 KB |
| 最終ジャッジ日時 | 2025-01-29 12:00:53 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef _RUTHEN
#include "debug.hpp"
#else
#define show(...) true
#endif
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
template <class T> using V = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll N, X, Y;
cin >> N >> X >> Y;
V<ll> R(N);
rep(i, N) cin >> R[i];
if (N == 1) {
if (X * X + Y * Y == R[0] * R[0]) {
cout << "Yes" << '\n';
} else {
cout << "No" << '\n';
}
} else {
sort(R.begin(), R.end());
ll rs = R[0];
for (int i = 1; i < N; i++) {
rs += 2 * R[i];
}
if (X * X + Y * Y <= rs * rs) {
cout << "Yes" << '\n';
} else {
cout << "No" << '\n';
}
}
return 0;
}