結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2019-11-06 16:58:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 1,493 bytes |
コンパイル時間 | 1,071 ms |
コンパイル使用メモリ | 104,644 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 00:20:46 |
合計ジャッジ時間 | 1,852 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include<iterator> #include<complex> #include<stack> using namespace std; #define lint long long int /* vector<char>al(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vector<char>AL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; */ int main() { vector<string>vec(4); getline(cin, vec.at(0)); getline(cin, vec.at(1)); lint Z = vec.at(1).size(); lint cnt = 0; for (lint i = 0; i < Z; i++) { if (vec.at(1).at(i) == ' ') { cnt++; } } if (cnt) { cout << '"'<<"assert"<<'"' << endl; } else { getline(cin, vec.at(2)); getline(cin, vec.at(3)); vector<lint>veca(4); for (lint i = 0; i < 4; i++) { veca.at(i) = stoll(vec.at(i)); } vector<lint>vecb(3); for (lint i = 0; i < 3; i++) { vecb.at(i) = veca.at(i + 1); } sort(vecb.begin(), vecb.end()); vector<lint>vecc(3); vecc.at(0) = vecb.at(0) + vecb.at(1); vecc.at(1) = vecb.at(0) + vecb.at(2); vecc.at(2) = vecb.at(1) + vecb.at(2); sort(vecc.begin(), vecc.end()); if (vecc.at(2) != vecc.at(1)) { cout << vecc.at(1) << endl; } else { cout << vecc.at(0) << endl; } } }