結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2024-02-22 00:34:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 635 bytes |
コンパイル時間 | 2,092 ms |
コンパイル使用メモリ | 200,928 KB |
最終ジャッジ日時 | 2025-02-19 18:42:02 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; cin >> n; cin.ignore(); string s; getline(cin, s); if (s.find(' ') != string::npos) { cout << "\"assert\"" << endl; return 0; } ll a = stoll(s); ll b, c; cin >> b >> c; vector<ll> v = { a + b, b + c, c + a }; sort(v.rbegin(), v.rend()); v.erase(unique(v.begin(), v.end()), v.end()); cout << v[1] << endl; return 0; }