제출 #716045

#제출 시각아이디문제언어결과실행 시간메모리
716045Charizard2021Worm Worries (BOI18_worm)C++17
10 / 100
1 ms208 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n, m, k, maxq; cin >> n >> m >> k >> maxq; int lo = 1, hi = n+1; while(lo+1 < hi){ int mi = (lo + hi) / 2; int r1, r2; cout << "? " << mi - 1 << " 1 1" << endl; cin >> r1; if (r1 == -1) exit(0); cout << "? " << mi << " 1 1" << endl; cin >> r2; if (r2 == -1){ exit(0); } if(r1 >= r2){ hi = mi; } else{ lo = mi; } } cout << "! " << lo << " 1 1" << endl; }
#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...