結果
問題 |
No.851 テストケース
|
ユーザー |
|
提出日時 | 2022-10-09 15:03:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 585 bytes |
コンパイル時間 | 2,213 ms |
コンパイル使用メモリ | 205,604 KB |
最終ジャッジ日時 | 2025-02-08 00:43:03 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 17 WA * 3 |
ソースコード
#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<<v[1]<<endl; }