結果

問題 No.353 ヘイトプラス
ユーザー hanorverhanorver
提出日時 2016-04-01 22:28:50
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 55,608 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-04-10 07:29:33
合計ジャッジ時間 3,608 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<climits>

int main() {
	int a, b;

	std::cin >> a >> b;

	int high = INT_MAX, low = 0;
	int mid;
	while (high - low != 1) {
		mid = (high + low) / 2;
		if (mid - b > a) {
			high = mid;
		} else {
			low = mid;
		}
	}
	std::cout <<low << std::endl;
	return 0;
}
0