結果
問題 | No.851 テストケース |
ユーザー |
![]() |
提出日時 | 2019-07-26 21:32:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 983 bytes |
コンパイル時間 | 2,341 ms |
コンパイル使用メモリ | 203,628 KB |
最終ジャッジ日時 | 2025-01-07 07:42:03 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} template<typename T> vector<T> compress(vector<T> v){ sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); return v; } template<typename T> map<T, Int> dict(const vector<T> &v){ map<T, Int> res; for(Int i=0;i<(Int)v.size();i++) res[v[i]]=i; return res; } //INSERT ABOVE HERE signed main(){ string s,t; getline(cin,s); getline(cin,t); if(t.find(" ")!=string::npos){ cout<<"\"assert\""<<endl; }else{ string u,v; getline(cin,u); getline(cin,v); Int x=stoll(t); Int y=stoll(u); Int z=stoll(v); vector<Int> vs; vs.emplace_back(x+y); vs.emplace_back(y+z); vs.emplace_back(z+x); vs=compress(vs); reverse(vs.begin(),vs.end()); cout<<vs[1]<<endl; } return 0; }