結果

問題 No.513 宝探し2
ユーザー nksk38nksk38
提出日時 2017-06-22 20:09:35
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 72,628 KB
実行使用メモリ 24,060 KB
平均クエリ数 2.83
最終ジャッジ日時 2023-09-24 01:21:02
合計ジャッジ時間 1,702 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,868 KB
testcase_01 AC 20 ms
23,652 KB
testcase_02 AC 21 ms
23,544 KB
testcase_03 AC 21 ms
23,520 KB
testcase_04 AC 20 ms
23,844 KB
testcase_05 AC 20 ms
23,640 KB
testcase_06 AC 19 ms
23,376 KB
testcase_07 AC 20 ms
23,640 KB
testcase_08 AC 19 ms
23,676 KB
testcase_09 AC 19 ms
24,060 KB
testcase_10 AC 19 ms
23,532 KB
testcase_11 AC 19 ms
24,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>

using namespace std;
typedef long long ll;
typedef pair<int, int> Pr;

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

int main()
{
	int A = solve(0,0);
	int B = solve(0, 1000000000);
	int x = (A + B - 1000000000) / 2;
	int y = A - x;
	solve(x, y);
	return	0;
}
0