結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-13 01:36:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 3,153 ms |
| コード長 | 626 bytes |
| コンパイル時間 | 2,552 ms |
| コンパイル使用メモリ | 201,968 KB |
| 最終ジャッジ日時 | 2025-01-11 03:24:43 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
vector<long long> v(3);
string s;
getline(cin, s); // newline
getline(cin, s);
if (count(s.begin(), s.end(), ' ') > 1)
cout << "\"assert\"" << endl;
else {
v[0] = stoll(s);
cin >> v[1] >> v[2];
vector<long long> sum;
REP (i, 3) REP (j, i) sum.push_back(v[i] + v[j]);
sort(sum.rbegin(), sum.rend());
sum.erase(unique(sum.begin(), sum.end()), sum.end());
cout << sum[1] << endl;
}
return 0;
}