結果

問題 No.594 壊れた宝物発見機
ユーザー daku9640daku9640
提出日時 2017-11-11 00:34:16
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,386 bytes
コンパイル時間 1,937 ms
コンパイル使用メモリ 198,772 KB
実行使用メモリ 43,584 KB
最終ジャッジ日時 2023-09-23 15:44:19
合計ジャッジ時間 8,387 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define P(x) cout << (x) << "\n"
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define vv(type, c, m, n, i) vector<vector<type>> c(m, vector<type>(n, i))
#define rep(i,a,n) for(int i=(a), i##_len=(n); i<i##_len; ++i)
#define rrep(i,a,n) for(int i=(a), i##_len=(n); i>i##_len; --i)
#define len(x) ((int)(x).size())
#define mp make_pair
#define eb emplace_back
#define fi first
#define se second
#define chmax(a,b) if(a<b)a=b
#define chmin(a,b) if(a>b)a=b
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long long> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int, int> pii;
int d[30];
int x[3] = {-100, 0, 100};
int y[3] = {-100, 0, 100};
int z[3] = {-100, 0, 100};
int main() {
	int cnt = 0;
	rep(i, 0, 3) rep(j, 0, 3) rep(k, 0, 3) {
		cout << "?" << x[i] << " " << y[j] << " " << z[k];
		cin >> d[cnt++];
	}
	cnt = 0;
	rep(i, 0, 3) rep(j, 0, 3) rep(k, 0, 3) {
		rep(x2, 0, 3) rep(y2, 0, 3) rep(z2, 0, 3) {
			if(hypot(hypot(double(x[x2] - i), double(y[y2] - j)), hypot(double(z[z2] - i), double(y[y2] - j))) == double(d[cnt++])) {
				continue;
			}
			cout << "!" << i << " " << j << " " << k;
			return 0;
		}
	}
	return 0;
}
0