結果

問題 No.514 宝探し3
ユーザー furafura
提出日時 2020-05-04 20:18:11
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 197,204 KB
実行使用メモリ 24,504 KB
平均クエリ数 3.75
最終ジャッジ日時 2023-09-24 03:26:00
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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=(1e5+a-b)/2;

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

	ask(x,y);

	return 0;
}
0