結果

問題 No.851 テストケース
ユーザー risujirohrisujiroh
提出日時 2019-07-26 21:25:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 3,153 ms
コード長 569 bytes
コンパイル時間 1,545 ms
コンパイル使用メモリ 175,336 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 06:35:28
合計ジャッジ時間 2,441 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  int n; cin >> n;
  cin.ignore();
  string s;
  getline(cin, s);
  if (s.find(' ') != string::npos) {
    cout << "\"assert\"" << '\n';
    return 0;
  }
  V<lint> a(3);
  a[0] = stoll(s);
  cin >> a[1] >> a[2];
  set<lint> se;
  se.insert(a[0] + a[1]);
  se.insert(a[0] + a[2]);
  se.insert(a[1] + a[2]);
  cout << *next(rbegin(se)) << '\n';
}
0