#include #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; template ostream& operator<<(ostream& os, const vector& v) { os << "sz:" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = (ll)1e9 + 7LL; template constexpr T INF = numeric_limits::max() / 64; ll ask(const int x, const int y, const int z) { cout << "? " << x << " " << y << " " << z << endl; ll i; cin >> i; return i; } int main() { cin.tie(0); ios::sync_with_stdio(false); int xinf = -100; int xsup = 100; int yinf = -100; int ysup = 100; int zinf = -100; int zsup = 100; while (true) { if (xinf == xsup and yinf == ysup and zinf == zsup) { break; } int minx; int miny; int minz; int mini = 10000; for (int i = 0; i < 2; i++) { const int x = (i == 0) ? xinf : xsup; for (int j = 0; j < 2; j++) { const int y = (i == 0) ? yinf : ysup; for (int k = 0; k < 2; k++) { const int z = (i == 0) ? zinf : zsup; if (ask(x, y, z) < mini) { minx = x; miny = y; minz = z; } } } } if (minx == xinf) { xsup = (xinf + xsup) / 2; } else if (minx == xinf) { xinf = (xinf + xsup) / 2; } if (miny == yinf) { ysup = (yinf + ysup) / 2; } else if (minx == xinf) { yinf = (yinf + ysup) / 2; } if (minz == zinf) { zsup = (zinf + zsup) / 2; } else if (minx == xinf) { zinf = (zinf + zsup) / 2; } } cout << "! " << xinf << " " << yinf << " " << zinf << endl; return 0; }