# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102482 | Autoratch | Aliens (IOI07_aliens) | C++14 | 5 ms | 512 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;
long long n,x,y,m;
bool examine(long long x,long long y)
{
if(x>n or x<1 or y>n or y<1) return false;
cout << "examine " << x << ' ' << y << '\n';
cout << flush;
string s;
cin >> s;
if(s=="true") return true;
else return false;
}
long long solve(int ax,int ay)
{
long long mul = 1;
while(examine(x+ax*mul,y+ay*mul)) mul*=2;
long long l = mul/2,r = mul;
while(l<r)
{
long long m = (l+r+1)/2;
if(examine(x+ax*m,y+ay*m)) l = m;
else r = m-1;
}
return l;
}
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... |