結果

問題 No.1944 ∞
ユーザー 👑 NachiaNachia
提出日時 2022-05-20 21:34:18
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,033 bytes
コンパイル時間 869 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 4,772 KB
最終ジャッジ日時 2023-10-20 11:53:39
合計ジャッジ時間 1,982 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 26 ms
4,772 KB
testcase_16 AC 4 ms
4,348 KB
testcase_17 AC 3 ms
4,348 KB
testcase_18 AC 3 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 3 ms
4,348 KB
testcase_21 AC 3 ms
4,348 KB
testcase_22 AC 3 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 2 ms
4,348 KB
testcase_25 AC 3 ms
4,348 KB
testcase_26 AC 4 ms
4,348 KB
testcase_27 AC 3 ms
4,348 KB
testcase_28 AC 3 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 4 ms
4,348 KB
testcase_31 AC 3 ms
4,348 KB
testcase_32 AC 4 ms
4,348 KB
testcase_33 AC 18 ms
4,772 KB
testcase_34 AC 18 ms
4,772 KB
testcase_35 AC 18 ms
4,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <array>
#include <atcoder/modint>
using namespace std;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
#define rep(i,n) for(int i=0; i<(int)(n); i++)

const i64 INF = 1001001001001001001;

using modint = atcoder::static_modint<998244353>;

int main(){
    int N; cin >> N;
    i64 X,Y; cin >> X >> Y;
    vector<i64> 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";
    }
    sort(R.begin(), R.end());
    i64 r = 0;
    for(auto rr : R) r += rr * 2;
    if(r >= 2'000'000'000){ cout << "Yes\n"; return 0; }

    i64 maxR = (r - R[0]) * (r - R[0]);
    i64 xy = X*X + Y*Y;
    if(maxR < xy) cout << "No\n"; else cout << "Yes\n";
    return 0;
}


struct ios_do_not_sync{
    ios_do_not_sync(){
        std::ios::sync_with_stdio(false);
        std::cin.tie(nullptr);
    }
} ios_do_not_sync_instance;


0