結果

問題 No.514 宝探し3
ユーザー TwizzTwizz
提出日時 2017-05-20 11:18:20
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 800 bytes
コンパイル時間 1,087 ms
コンパイル使用メモリ 144,464 KB
実行使用メモリ 24,540 KB
平均クエリ数 8.00
最終ジャッジ日時 2023-09-23 14:07:07
合計ジャッジ時間 3,854 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 WA -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 24 ms
23,700 KB
testcase_08 AC 23 ms
23,424 KB
testcase_09 RE -
testcase_10 WA -
testcase_11 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:31:42: warning: ‘nowy’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   print(dx[i] * nowx / 2 << " " << dy[i] * nowy / 2);
                                          ^
main.cpp:31:15: warning: ‘nowx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   print(dx[i] * nowx / 2 << " " << dy[i] * nowy / 2);
               ^

ソースコード

diff #

#include"bits/stdc++.h"

//#include<bits/stdc++.h>
using namespace std;
#define print(x) cout<<x<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define REP(i,a) for(int i=0;i<a;i++)
typedef long long ll;
const ll mod = 10000000000;

int main() {
	int max = 1000000000;
	int prex, prey, nowx, nowy;
	int dist[20] = {};
	int dx[4] = { 1, 1, -1, -1 };
	int dy[4] = { 1, -1, 1, -1 };
	print(max / 2 << " " << max / 2);
	prex = max / 2; prey = max / 2;
	int m = 0;
	cin >> m;
	int n = m;
	int mi = 99;
	REP(i, 4) {
		print(dx[i] * n / 2 << " " << dy[i] * n / 2);
		cin >> dist[i];
		if (m > dist[i]) {
			m = dist[i]; mi = i; nowx = dx[i] * n / 2;nowy= dy[i] * n / 2;
		}
	}
	REP(i, 4) {
		print(dx[i] * nowx / 2 << " " << dy[i] * nowy / 2);
		int d = 0;
		cin >> d;
		if (d == 0)return 0;
	}
	return 1;
}
0