#include using namespace std; using ll = long long; int ax = -25, ay = 25, az = 35; // 質問クエリ int ask(int x, int y, int z) { int d; cout << "?" << " " << x << " " << y << " " << z << endl; cin >> d; return d;//(ax - x) * (ax - x) + (ay - y) * (ay - y) + (az - z) * (az - z); } // 回答クエリ void answer(int x, int y, int z) { cout << "!" << " " << x << " " << y << " " << z << endl; } struct Point { int x; int y; int z; }; bool judge(vector& v) { return v[1].x - v[0].x > 1 || v[2].y - v[0].y > 1 || v[4].z - v[0].z > 0; } int mid(int x, int y) { int sum = x + y; if (sum < 0) return (sum - 1) / 2; else return (sum + 1) / 2; } int main() { cin.tie(0); ios::sync_with_stdio(false); vector v; for (int i = 0; i < 8; i++) { int x, y, z; if (i & 1) x = 100; else x = -100; if (i & 2) y = 100; else y = -100; if (i & 4) z = 100; else z = -100; v.push_back((Point){x, y, z}); } int idx = -1, vmax = 1145141919; int cnt = 0; Point ap; while (judge(v) && cnt < 192) { vector ans(8); for (int i = 0; i < 8; i++) { ans[i] = ask(v[i].x, v[i].y, v[i].z); cnt++; } int ti = 0; for (int i = 1; i < 8; i++) { if (ans[i] < ans[ti]) { ti = i; } } idx = ti; if (ans[idx] < vmax) { vmax = ans[idx]; ap.x = v[idx].x; ap.y = v[idx].y; ap.z = v[idx].z; } Point p = v[idx]; for (int i = 0; i < 8; i++) { if (idx == i) continue; v[i].x = mid(v[i].x, v[idx].x); v[i].y = mid(v[i].y, v[idx].y); v[i].z = mid(v[i].z, v[idx].z); } } answer(ap.x, ap.y, ap.z); return 0; }