結果

問題 No.513 宝探し2
ユーザー misora192misora192
提出日時 2020-07-24 21:44:49
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 1,422 ms
コンパイル使用メモリ 163,448 KB
実行使用メモリ 24,420 KB
平均クエリ数 2.83
最終ジャッジ日時 2023-09-24 02:43:08
合計ジャッジ時間 2,904 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,424 KB
testcase_01 AC 24 ms
23,616 KB
testcase_02 AC 25 ms
24,276 KB
testcase_03 AC 24 ms
24,420 KB
testcase_04 AC 25 ms
23,436 KB
testcase_05 AC 25 ms
24,048 KB
testcase_06 AC 25 ms
23,604 KB
testcase_07 AC 25 ms
23,556 KB
testcase_08 AC 25 ms
23,724 KB
testcase_09 AC 25 ms
24,084 KB
testcase_10 AC 25 ms
23,676 KB
testcase_11 AC 25 ms
23,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)

using namespace std;

typedef long long ll;

int ask(int x, int y){
	cout << x << " " << y << endl;
	int ret;
	cin >> ret;
	if(ret == 0) exit(0);
	return ret;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int a = ask(0, 0);
	int b = ask(0, 1e7);
	int x = (a + b - 1e7) / 2;
	int y = a - x;

	ask(x, y);
}
0