結果

問題 No.353 ヘイトプラス
ユーザー hanorver
提出日時 2016-04-01 22:28:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 494 ms
コンパイル使用メモリ 53,720 KB
実行使用メモリ 12,068 KB
最終ジャッジ日時 2024-10-02 09:12:52
合計ジャッジ時間 3,782 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 2 TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

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