結果

問題 No.514 宝探し3
ユーザー dnishdnish
提出日時 2017-05-05 23:23:09
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 1,933 ms
コンパイル使用メモリ 164,276 KB
実行使用メモリ 24,276 KB
平均クエリ数 3.50
最終ジャッジ日時 2023-09-23 13:48:27
合計ジャッジ時間 2,789 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,544 KB
testcase_01 AC 23 ms
23,916 KB
testcase_02 AC 22 ms
23,556 KB
testcase_03 AC 23 ms
23,400 KB
testcase_04 AC 24 ms
23,916 KB
testcase_05 AC 23 ms
24,276 KB
testcase_06 AC 24 ms
23,748 KB
testcase_07 AC 23 ms
24,252 KB
testcase_08 AC 22 ms
23,340 KB
testcase_09 AC 24 ms
23,820 KB
testcase_10 AC 23 ms
24,276 KB
testcase_11 AC 22 ms
24,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int)N;i++)
#define p(s) cout<<(s)<<endl
#define ck(n,a,b) ((a)<=(n)&&(n)<(b))
#define F first
#define S second
typedef long long ll;
using namespace std;
const int inf=1e9;


int main(){
	int X,Y;
	cout << 0 <<" "<< 0 <<endl;
	int d;
	cin>>d;
	X=d/2;
	Y=d-X;
	cout << X <<" "<< Y <<endl;
	int a;
	cin>>a;
	cout << X+a/2+a%2 <<" "<< Y-a/2-a%2 <<endl;
	cin>>d;
	if(d!=0){
		cout << X-a/2-a%2 <<" "<< Y+a/2+a%2 <<endl;
		cin>>d;
	}
	return 0;
}
0