#include #include #include #include #include #include #include #include #include #include #include #include #define L64 long long #define UL64 unsigned long long #define MOD (1000000007LL) using namespace std; int ask(int pos, int val) { int d; int x = pos == 0 ? val : 0; int y = pos == 1 ? val : 0; int z = pos == 2 ? val : 0; cout << "?" << " " << x << " " << y << " " << z << endl; cin >> d; return d; } void answer(int x, int y, int z) { cout << "!" << " " << x << " " << y << " " << z << endl; } int solve(int pos) { int left = -150; int right = 150; int vl = ask(pos, left); int vr = ask(pos, right); while(true){ int mid1 = (left * 2 + right) / 3; int mid2 = (left + right * 2) / 3; int vm1 = ask(pos, mid1); int vm2 = ask(pos, mid2); bool det = (right - left) <= 3; if(vl < vm1){ if(det) return left; right = mid1; vr = vm1; } else if(vm1 < vm2){ if(det) return mid1; right = mid2; vr = vm2; } else if(vm2 < vr){ if(det) return mid2; left = mid1; vl = vm1; } else { if(det) return right; left = mid2; vl = vm2; } } return 0; } int main(void) { int x = solve(0); int y = solve(1); int z = solve(2); answer(x, y, z); }