제출 #1032807

#제출 시각아이디문제언어결과실행 시간메모리
1032807anangoWorm Worries (BOI18_worm)C++17
10 / 100
1 ms344 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int INF = 1LL<<30; int query(int x, int y, int z) { cout << "? " << x <<" " << y <<" " <<z << endl; int an; cin >> an; return an; } void answer(int x, int y, int z) { cout << "! " << x << " " << y << " " << z << endl; } int n,m,k,q; signed main() { cin >> n >> m >> k >> q; int l = 1; int r = n; while (l<r) { int m1 = (l+r-1)/2; int m2 = m1+1; if (query(m1,1,1)<query(m2,1,1)) { l=m1+1; r=r; } else { l=l; r=m2-1; } } answer(l,1,1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...