結果
問題 |
No.1944 ∞
|
ユーザー |
|
提出日時 | 2022-05-25 00:56:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 459 bytes |
コンパイル時間 | 1,720 ms |
コンパイル使用メモリ | 173,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-20 14:37:54 |
合計ジャッジ時間 | 2,502 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for (int i=0;i<(int)(n);i++) ll d2(ll x){ double y=x; y=y*y; if(y>4e18) return 4e18; else return x*x; } int main(){ ll n,x,y; cin>>n>>x>>y; vector<ll> r(n); ll rs=0; rep(i,n){ cin>>r.at(i); rs+=r.at(i)*2; } sort(r.begin(),r.end()); rs-=r.at(0); ll fxy=x*x+y*y; ll rrs=d2(rs); if(rrs<fxy) cout<<"No"<<endl; else cout<<"Yes"<<endl; }