結果
問題 |
No.1944 ∞
|
ユーザー |
![]() |
提出日時 | 2022-05-20 22:30:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 649 bytes |
コンパイル時間 | 2,304 ms |
コンパイル使用メモリ | 199,332 KB |
最終ジャッジ日時 | 2025-01-29 10:58:02 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 WA * 6 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int,int>; using vv = vector<vector<int>>; const int INF = (int)2e9; const LL LINF = (LL)1e18; int main(){ int N; LL X, Y; cin >> N >> X >> Y; vector<LL> R(N); rep(i,N) cin >> R[i]; if(N == 1){ if(X * X + Y * Y == R[0] * R[0]) cout << "Yes" << endl; else cout << "No" << endl; return 0; } sort(R.begin(), R.end()); LL tot = R[0]; rep(i,N-1) tot += R[i] * 2; if(tot > INF) cout << "Yes" << endl; else if(tot * tot >= X * X + Y * Y) cout << "Yes" << endl; else cout << "No" << endl; return 0; }