結果

問題 No.91 赤、緑、青の石
ユーザー ldsybldsyb
提出日時 2016-03-30 11:37:11
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 213 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 65,976 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-06 12:20:12
合計ジャッジ時間 3,903 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 150 ms
4,376 KB
testcase_01 AC 99 ms
4,376 KB
testcase_02 AC 62 ms
4,376 KB
testcase_03 AC 111 ms
4,376 KB
testcase_04 AC 54 ms
4,380 KB
testcase_05 AC 129 ms
4,380 KB
testcase_06 AC 38 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 39 ms
4,380 KB
testcase_12 AC 120 ms
4,376 KB
testcase_13 AC 134 ms
4,376 KB
testcase_14 AC 90 ms
4,376 KB
testcase_15 AC 142 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 213 ms
4,376 KB
testcase_26 AC 202 ms
4,380 KB
testcase_27 AC 1 ms
4,376 KB
testcase_28 AC 19 ms
4,380 KB
testcase_29 AC 40 ms
4,376 KB
testcase_30 AC 149 ms
4,380 KB
testcase_31 AC 195 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
   int rgb[3];
   cin >> rgb[0] >> rgb[1] >> rgb[2];
   while(true){
      stable_sort(rgb,rgb + 3);
      if(rgb[0] + 3 > rgb[2]) break;
      rgb[0]++;
      rgb[2] -= 2;
   }
   cout << rgb[0] << endl;
}
0