結果

問題 No.514 宝探し3
ユーザー masa
提出日時 2017-05-06 00:31:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 629 ms
コンパイル使用メモリ 68,012 KB
実行使用メモリ 25,604 KB
平均クエリ数 2.67
最終ジャッジ日時 2024-07-16 13:31:32
合計ジャッジ時間 1,989 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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