結果

問題 No.514 宝探し3
ユーザー furafura
提出日時 2020-05-04 20:22:03
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 1,845 ms
コンパイル使用メモリ 196,928 KB
実行使用メモリ 24,516 KB
平均クエリ数 2.83
最終ジャッジ日時 2023-09-24 03:25:55
合計ジャッジ時間 4,168 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,940 KB
testcase_01 AC 25 ms
24,384 KB
testcase_02 AC 22 ms
24,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 23 ms
23,592 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 25 ms
24,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int ask(int x,int y){
	printf("%d %d\n",x,y);
	fflush(stdout);
	int res; scanf("%d",&res);
	if(res==0) exit(0);
	return res;
}

int main(){
	int a,b,x,y;

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

	ask(x,y);

	return 0;
}
0