結果
| 問題 | No.1944 ∞ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-04 15:30:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 2,714 bytes |
| 記録 | |
| コンパイル時間 | 1,256 ms |
| コンパイル使用メモリ | 123,464 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 01:58:09 |
| 合計ジャッジ時間 | 2,196 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
ソースコード
#line 2 "/home/sakflat/CP/_library/cpp/template/template.cpp"
//yukicoder@cpp17
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <random>
#include <bitset>
#include <complex>
#include <utility>
#include <numeric>
#include <functional>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
const ll MOD = 998244353;
const ll MODx = 1000000007;
const int INF = (1<<30)-1;
const ll LINF = (1LL<<62LL)-1;
const double EPS = (1e-10);
P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }
/*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる
計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/
/* comment outed because can cause bugs
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
*/
#line 2 "/home/sakflat/CP/_library/cpp/template/basic.cpp"
// 整数型を取得することを想定
template <typename T>
T CeilExactSqrt(int c, T x){
T mn = 0;
T mx = x;
while(mx-mn > 1){
T ce = (mn+mx)/2;
T nw = 1;
for(int i = 0; c > i; i++){
if(x/ce < nw){
mx = ce;
break;
}
nw *= ce;
if(i+1 == c && x == nw){
mx = ce;
}
}
if(mx != ce)mn = ce;
}
return mx;
}
template <typename T>
T FloorExactSqrt(int c, T x){
T mn = 0;
T mx = x;
while(mx-mn > 1){
T ce = (mn+mx)/2;
T nw = 1;
for(int i = 0; c > i; i++){
if(x/ce < nw){
mx = ce;
break;
}
nw *= ce;
}
if(mx != ce)mn = ce;
}
return mn;
}
int main(){
long long n,x,y;cin>>n>>x>>y;
vector<long long> A(n);
for(int i = 0; n > i; i++)cin>>A[i];
if(n == 1){
if(x*x+y*y == A[0]*A[0])cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}else{
long long r = 0;
for(int i = 0; n > i; i++){
r += A[i]*2;
}
for(int i = 0; n > i; i++){
long long z = r-A[i];
if((x*x+y*y+z-1)/z <= z){
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
}
return 0;
}