結果
問題 | No.851 テストケース |
ユーザー |
![]() |
提出日時 | 2019-10-11 00:14:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 506 bytes |
コンパイル時間 | 1,604 ms |
コンパイル使用メモリ | 173,192 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 05:18:29 |
合計ジャッジ時間 | 2,552 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);++i) using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); string n; getline(cin, n); string s; getline(cin, s); ll a = 0; rep(i, s.size()) { if (s[i] == ' ') { cout << '"' << "assert" << '"' << endl; return 0; } a *= 10; a += s[i] - '0'; } ll b, c; cin >> b >> c; vector<ll> d = {a+b,a+c,b+c}; sort(d.begin(), d.end()); if (d[1] == d[2]) cout << d[0]; else cout << d[1]; }