結果

問題 No.91 赤、緑、青の石
ユーザー mmn15277198
提出日時 2021-02-11 20:45:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 580 ms
コンパイル使用メモリ 74,908 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-18 08:29:35
合計ジャッジ時間 29,054 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 9 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
using ll = long long;

int main(){
    vector<int> a(3);
    cin >> a[0] >> a[1] >> a[2];
    int t = 100000000;
    while(t--){
        sort(a.begin() , a.end());
        if(a[2] >= 2 && a[2] > a[0]){
            a[0] += 1;
            a[2] -= 2;
        }
        //cout << a[0] << " : " << a[1] << " : " << a[2] << endl;
    }
    cout << min({a[0] , a[1] , a[2]}) << endl;
    return 0;
}
0