結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2019-07-26 21:26:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 635 bytes |
コンパイル時間 | 745 ms |
コンパイル使用メモリ | 71,880 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-02 06:36:55 |
合計ジャッジ時間 | 1,534 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 10 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <stdlib.h> using namespace std; int n; vector<string> vec; vector<int> vec2; int main(void) { string s; while(getline(cin, s)){ vec.push_back(s); } if(vec.size() == 2){ cout << "\"assert\"" << endl; return 0; } vec2.push_back(atoi(vec[1].c_str()) + atoi(vec[2].c_str())); vec2.push_back(atoi(vec[1].c_str()) + atoi(vec[2].c_str())); vec2.push_back(atoi(vec[2].c_str()) + atoi(vec[3].c_str())); sort(vec2.rbegin(), vec2.rend()); vec2.erase(unique(vec2.begin(), vec2.end()), vec2.end()); cout << vec2[1] << endl; return 0; }