結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-09 15:05:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 3,153 ms |
| コード長 | 586 bytes |
| コンパイル時間 | 2,296 ms |
| コンパイル使用メモリ | 205,048 KB |
| 最終ジャッジ日時 | 2025-02-08 00:43:12 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
string N;
getline(cin,N);
vector<ll> a;
string ai;
while(getline(cin,ai)){
for(int i=0;i<ai.size();i++){
if(ai[i]==' '){
cout<<'"'<<"assert"<<'"'<<endl;
return 0;
}
}
a.push_back(stoll(ai));
}
vector<ll> v={a[0]+a[1],a[1]+a[2],a[0]+a[2]};
sort(v.begin(),v.end());
set<ll> st(v.begin(),v.end());
vector<ll> v2(st.begin(),st.end());
reverse(v2.begin(),v2.end());
cout<<v2[1]<<endl;
}