結果
問題 |
No.851 テストケース
|
ユーザー |
|
提出日時 | 2020-06-13 01:35:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 622 bytes |
コンパイル時間 | 3,083 ms |
コンパイル使用メモリ | 202,092 KB |
最終ジャッジ日時 | 2025-01-11 03:24:33 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 18 WA * 2 |
ソースコード
#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; }