結果

問題 No.2175 Exciting Combo
ユーザー KY0145
提出日時 2023-01-13 02:14:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 1,491 ms
コンパイル使用メモリ 165,452 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 18:13:43
合計ジャッジ時間 2,182 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int A[3], B, ans, maxa, maxc;
  cin >> A[0] >> A[1] >> A[2] >> B;
  maxc = A[0] + A[1] + A[2] + B;
  maxa = *max_element(A, A+3) * 3;
  ans = max(maxa, maxc);
  cout << ans << endl;
  
  return 0;
}
0