結果

問題 No.91 赤、緑、青の石
ユーザー startcppstartcpp
提出日時 2014-12-07 19:58:01
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 281 ms / 5,000 ms
コード長 540 bytes
コンパイル時間 1,720 ms
コンパイル使用メモリ 75,284 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-06 12:06:29
合計ジャッジ時間 10,867 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 271 ms
4,376 KB
testcase_01 AC 274 ms
4,376 KB
testcase_02 AC 276 ms
4,376 KB
testcase_03 AC 273 ms
4,380 KB
testcase_04 AC 276 ms
4,380 KB
testcase_05 AC 273 ms
4,380 KB
testcase_06 AC 277 ms
4,376 KB
testcase_07 AC 278 ms
4,380 KB
testcase_08 AC 278 ms
4,376 KB
testcase_09 AC 279 ms
4,376 KB
testcase_10 AC 279 ms
4,376 KB
testcase_11 AC 277 ms
4,376 KB
testcase_12 AC 273 ms
4,376 KB
testcase_13 AC 271 ms
4,376 KB
testcase_14 AC 274 ms
4,376 KB
testcase_15 AC 273 ms
4,376 KB
testcase_16 AC 281 ms
4,376 KB
testcase_17 AC 278 ms
4,380 KB
testcase_18 AC 279 ms
4,380 KB
testcase_19 AC 278 ms
4,376 KB
testcase_20 AC 281 ms
4,376 KB
testcase_21 AC 278 ms
4,376 KB
testcase_22 AC 279 ms
4,380 KB
testcase_23 AC 278 ms
4,376 KB
testcase_24 AC 278 ms
4,376 KB
testcase_25 AC 268 ms
4,376 KB
testcase_26 AC 268 ms
4,380 KB
testcase_27 AC 278 ms
4,380 KB
testcase_28 AC 279 ms
4,376 KB
testcase_29 AC 278 ms
4,380 KB
testcase_30 AC 273 ms
4,376 KB
testcase_31 AC 270 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
using namespace std;

int input[3];

int main(){
	int i;
	int ans = 0;
	cin >> input[0] >> input[1] >> input[2];
	
	for( i = 0; i < 20000000; i++ ){
		sort( input, input+3 );
		ans = max( ans, input[0] );
		//交換
		input[2]-=2;
		input[0]++;
	}
	cout << ans << endl;
	return 0;
}
0