#include using namespace std; using int64 = long long; // 質問クエリ int ask(int x, int y, int z) { int d; cout << "?" << " " << x << " " << y << " " << z << endl; cin >> d; return d; } // 回答クエリ void answer(int x, int y, int z) { cout << "!" << " " << x << " " << y << " " << z << endl; } int findMaximal(int from, int to, int v) { for(; to - from > 1;) { int mid = (from + to) / 2; if(v == 0) (ask(mid, 0, 0) - ask(mid - 1, 0, 0) < 0 ? from : to) = mid; else if(v == 1)(ask(0, mid, 0) - ask(0, 0, mid - 1) < 0 ? from : to) = mid; else (ask(0, 0, mid) - ask(0, 0, mid - 1) < 0 ? from : to) = mid; } return from; } int main(void) { answer(findMaximal(-150, 151, 0), findMaximal(-150, 151, 1), findMaximal(-150, 151, 2)); }