結果

問題 No.851 テストケース
ユーザー @abcde@abcde
提出日時 2019-08-23 18:33:07
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 837 bytes
コンパイル時間 1,700 ms
コンパイル使用メモリ 175,332 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 15:40:26
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// ※※※ 解答不能. ※※※
// 以下のソースコード参照.
// heno_code氏.
// https://yukicoder.me/submissions/362244
#include <bits/stdc++.h>
using namespace std;
using LL = long long;

void solve(){
    int n;
    cin >> n;
    string s;
    getline(cin, s);
    getline(cin, s);
    for(int i = 0; i < s.length(); i++){
        if(s[i] == ' '){
            cout << "\"assert\"" << endl;
            return;
        }
    }
    LL c[3];
    c[0] = stoll(s);
    cin >> c[1] >> c[2];
    vector<LL> v;
    for(int i = 0; i < 3; i++) v.push_back(c[0] + c[1] + c[2] - c[i]);
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    sort(v.begin(), v.end(), greater<LL>());
    cout << v[1] << endl;
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    solve();
    return 0;
}
0