結果

問題 No.91 赤、緑、青の石
ユーザー koba-e964
提出日時 2015-06-07 16:09:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 883 bytes
コンパイル時間 712 ms
コンパイル使用メモリ 85,836 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 06:48:28
合計ジャッジ時間 2,120 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef pair<int, int> PI;
const double EPS=1e-9;



int main(void){
  int s[3];
  cin >> s[0] >> s[1] >> s[2];
  REP(c, 0, 10000001) {
    int q = 0;
    REP(j, 0, 3) {
      if (s[j] >= c) {
	q += (s[j] - c) / 2;
      } else {
	q += s[j] - c;
      }
    }
    if (q < 0) {
      cout << c - 1 << endl;
      return 0;
    }
    
  }
}
0