結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2019-07-27 00:07:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 597 bytes |
コンパイル時間 | 1,655 ms |
コンパイル使用メモリ | 174,588 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 10:11:09 |
合計ジャッジ時間 | 2,392 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define CONTAINS(v, x) (find(v.begin(), v.end(), x) != v.end()) // ==================================================================== int main() { string s; getline(cin, s); vector<ll> v(3); for (int i = 0; i < 3; i++) { getline(cin, s, '\n'); if (CONTAINS(s, ' ')) { cout << "\"assert\"" << endl; return 0; } else { v[i] = stoll(s); } } set<ll> ans; ans.insert(v[0] + v[1]); ans.insert(v[0] + v[2]); ans.insert(v[1] + v[2]); cout << *prev(ans.end(), 2) << endl; }