結果

問題 No.514 宝探し3
ユーザー umaumaxumaumax
提出日時 2017-05-06 00:07:27
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 63,800 KB
実行使用メモリ 24,360 KB
平均クエリ数 2.67
最終ジャッジ日時 2023-09-23 13:52:03
合計ジャッジ時間 1,678 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,084 KB
testcase_01 AC 24 ms
24,072 KB
testcase_02 AC 25 ms
23,652 KB
testcase_03 AC 25 ms
24,276 KB
testcase_04 AC 25 ms
23,436 KB
testcase_05 AC 26 ms
24,360 KB
testcase_06 AC 26 ms
23,448 KB
testcase_07 AC 26 ms
24,036 KB
testcase_08 AC 25 ms
23,532 KB
testcase_09 AC 26 ms
23,880 KB
testcase_10 AC 25 ms
24,336 KB
testcase_11 AC 25 ms
23,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <functional>
#include <iostream>
#include <map>

using namespace std;

int main(int argc, const char* argv[])
{
	bool flag = false;
	auto f	= [&](uint32_t x, uint32_t y) {
		if (flag) return 0;
		cout << x << " " << y << endl;
		int d;
		cin >> d;
		if (d == 0) flag = true;
		return d;
	};
	uint32_t d0 = f(0, 0);
	uint32_t d1 = f(d0, 0);
	uint32_t x = d0 - d1 / 2, y = d1 / 2;
	uint32_t d2 = f(x, y);
	return 0;
}
0