提出 #4828430


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    vector<int> L(N);
    int tmp;
    for (int i = 0; i < N; i++) {
        cin >> tmp;
        L[i] = tmp;
    }

    sort(L.begin(), L.end());
    int largest = L.back();
    L.pop_back();
    int sum = accumulate(L.begin(), L.end(), 0);
    if (largest < sum) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
    }

    return 0;
}

提出情報

提出日時
問題 B - Polygon
ユーザ yopiyama
言語 C++14 (GCC 5.4.1)
得点 200
コード長 553 Byte
結果 AC
実行時間 1 ms
メモリ 256 KiB

ジャッジ結果

セット名 All Sample
得点 / 配点 200 / 200 0 / 0
結果
AC × 18
AC × 3
セット名 テストケース
All 0_small_1, 0_small_2, 0_small_3, 0_small_4, 1_max_1, 1_max_2, 1_max_3, 1_max_4, 2_hand_1, 2_hand_2, 2_hand_3, 2_hand_4, 2_hand_5, 2_hand_6, 2_hand_7, sample_01, sample_02, sample_03
Sample sample_01, sample_02, sample_03
ケース名 結果 実行時間 メモリ
0_small_1 AC 1 ms 256 KiB
0_small_2 AC 1 ms 256 KiB
0_small_3 AC 1 ms 256 KiB
0_small_4 AC 1 ms 256 KiB
1_max_1 AC 1 ms 256 KiB
1_max_2 AC 1 ms 256 KiB
1_max_3 AC 1 ms 256 KiB
1_max_4 AC 1 ms 256 KiB
2_hand_1 AC 1 ms 256 KiB
2_hand_2 AC 1 ms 256 KiB
2_hand_3 AC 1 ms 256 KiB
2_hand_4 AC 1 ms 256 KiB
2_hand_5 AC 1 ms 256 KiB
2_hand_6 AC 1 ms 256 KiB
2_hand_7 AC 1 ms 256 KiB
sample_01 AC 1 ms 256 KiB
sample_02 AC 1 ms 256 KiB
sample_03 AC 1 ms 256 KiB