結果

問題 No.91 赤、緑、青の石
ユーザー 古寺いろは
提出日時 2015-04-12 16:26:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 162,456 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 06:47:29
合計ジャッジ時間 2,917 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;



int main(){
	vector<int> num(3);
	for (int i = 0; i < 3; i++)
	{
		cin >> num[i];
	}
	while (true){
		sort(num.begin(), num.end());
		if (num[0] + 3 > num[2]) break;
		num[0]++;
		num[2] -= 2;
	}
	cout << num[0] << endl;
}
0