# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
77140 | doowey | Aliens (IOI07_aliens) | C++14 | 5 ms | 548 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int N, M, x, y, i, d, a, lo, hi;
string inp;
bool get(int x,int y){
printf("examine %d %d\n",(signed)x,(signed)y);
fflush(stdout);
cin >> inp;
return inp == "true";
}
signed main(){
scanf("%lld%lld%lld",&N,&x,&y);
for(i=0;x+(1LL<<i)<=N;i++){
if(!get(x+(1LL<<i),y)) break;
}
lo = 1, hi = 1LL<<i;
while(lo<hi){
int m=lo+hi>>1;
if(!get(x+m,y)) hi=m;
else lo=m+1;
}
lo--; d = lo; a = 0;
for(i=0;x-(1LL<<i)>=1;i++){
if(!get(x-(1LL<<i),y)) break;
}
lo = 1, hi = 1LL<<i;
while(lo<hi){
int m=lo+hi>>1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |