結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
r1933
|
| 提出日時 | 2019-07-26 22:08:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,163 bytes |
| コンパイル時間 | 1,636 ms |
| コンパイル使用メモリ | 175,120 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-02 07:27:03 |
| 合計ジャッジ時間 | 2,996 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 RE * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define reps(i, m, n) for (int i = m; i <= n; ++i)
using i64 = long long;
using pii = pair<i64, i64>;
template<class A, class B>inline bool chmax(A &a, const B &b){return b > a ? a = b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b < a ? a = b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod = int(1e9) + 7;
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
cin.ignore();
string s;
getline(cin, s);
int cnt = 0;
for (auto e : s) {
if (e == ' ') {
cout << '"' << "assert" << '"' << "\n";
return 0;
}
++cnt;
}
i64 a[4];
a[0] = stoi(s.substr(0, cnt));
s.clear();
vector<i64> vec;
cin >> a[1] >> a[2];
i64 case1 = a[0] + a[1];
i64 case2 = a[1] + a[2];
i64 case3 = a[0] + a[2];
vec.push_back(case1);
vec.push_back(case2);
vec.push_back(case3);
sort(all(vec), greater<i64>());
cout << (vec[0] == vec[1] ? vec[2] : vec[1]) << "\n";
return 0;
}
r1933