結果

問題 No.91 赤、緑、青の石
ユーザー tubo28tubo28
提出日時 2014-12-07 21:57:55
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 145 ms / 5,000 ms
コード長 1,201 bytes
コンパイル時間 1,132 ms
コンパイル使用メモリ 76,020 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-06 12:08:09
合計ジャッジ時間 4,324 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
4,376 KB
testcase_01 AC 82 ms
4,380 KB
testcase_02 AC 126 ms
4,376 KB
testcase_03 AC 97 ms
4,376 KB
testcase_04 AC 116 ms
4,380 KB
testcase_05 AC 106 ms
4,376 KB
testcase_06 AC 71 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 122 ms
4,380 KB
testcase_12 AC 119 ms
4,384 KB
testcase_13 AC 78 ms
4,380 KB
testcase_14 AC 104 ms
4,380 KB
testcase_15 AC 126 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,384 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 128 ms
4,376 KB
testcase_26 AC 127 ms
4,376 KB
testcase_27 AC 145 ms
4,376 KB
testcase_28 AC 124 ms
4,380 KB
testcase_29 AC 82 ms
4,380 KB
testcase_30 AC 135 ms
4,376 KB
testcase_31 AC 131 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <sstream>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<" ["<<__LINE__<<"]"<<endl)
struct DUMP:ostringstream{template<class T>DUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<<t;return *this;}};
#else
#define dump(...)
#endif
// 1 1 1
// 1 3
// 5

int main(){
    int a[3];
    while(cin>>a[0]){
        rep(i,2)cin>>a[i+1];
        int m=max({a[0],a[1],a[2]});
        int ans=min({a[0],a[1],a[2]});
        rep(i,m){
            sort(a,a+3);
            a[0]++;
            a[2]-= 2;
            dump(a[0],a[1],a[2]);
            ans=max(ans,min({a[0],a[1],a[2]}));
        }
        cout << ans << endl;
    }
}
0