結果
| 問題 |
No.1944 ∞
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2022-05-20 23:01:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 614 bytes |
| コンパイル時間 | 2,029 ms |
| コンパイル使用メモリ | 199,396 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-06-20 00:28:24 |
| 合計ジャッジ時間 | 3,206 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
ll n,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(ALL(R));
ll sum=0;
rep(i,n){
if(i==0) sum+=R[i];
else sum+=2*R[i];
}
if(sum>=1415000000) cout<<"Yes"<<endl;
else if(x*x+y*y<=sum*sum) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
umezo