結果

問題 No.851 テストケース
ユーザー minimamu21
提出日時 2020-04-01 16:47:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 435 bytes
コンパイル時間 1,897 ms
コンパイル使用メモリ 172,736 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 00:01:03
合計ジャッジ時間 2,436 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
using ll=long long;
int main(){
    ll n;
    cin>>n>>ws;
    string s;
    getline(cin,s);
    if(s.find(' ')!=s.npos){
        cout<<"\"assert\"\n";
        return 0;
    }
    ll a=atol(s.c_str()),b,c; 
    cin>>b>>c;
    vector<ll>r({a+b,b+c,c+a});
    sort(r.begin(),r.end());
    if(r[2]==r[1])cout<<r[0]<<endl;
    else cout<<r[1]<<endl;
}
0