結果

問題 No.514 宝探し3
ユーザー masamasa
提出日時 2017-05-06 00:31:53
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 67,388 KB
実行使用メモリ 24,228 KB
平均クエリ数 2.67
最終ジャッジ日時 2023-09-23 13:53:21
合計ジャッジ時間 1,862 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,532 KB
testcase_01 AC 25 ms
23,364 KB
testcase_02 AC 26 ms
23,976 KB
testcase_03 AC 24 ms
24,000 KB
testcase_04 AC 26 ms
24,228 KB
testcase_05 AC 24 ms
23,664 KB
testcase_06 AC 26 ms
23,364 KB
testcase_07 AC 25 ms
24,036 KB
testcase_08 AC 25 ms
24,024 KB
testcase_09 AC 25 ms
23,484 KB
testcase_10 AC 26 ms
23,844 KB
testcase_11 AC 26 ms
23,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>

using namespace std;

int query(int x, int y) {
	cout << x << " " << y << endl;
	int ret;
	cin >> ret;
	return ret;
}

int main() {
	int a = query(0, 0);
	if (a == 0) {
		return 0;
	}

	int b = query(a, 0);
	if (b == 0) {
		return 0;
	}

	query(a - b / 2, b / 2);

	return 0;
}
0