# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
65128 | edisonhello | Aliens (IOI07_aliens) | C++11 | 7 ms | 576 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 point pair<long long,long long>
#define X first
#define Y second
point operator+(const point &a,const point &b){ return point(a.X+b.X,a.Y+b.Y); }
point operator-(const point &a,const point &b){ return point(a.X-b.X,a.Y-b.Y); }
point operator*(const point &a,const int &x){ return point(a.X*x,a.Y*x); }
point operator/(const point &a,const int &x){ return point(a.X/x,a.Y/x); }
map<point,int> rec;
int n;
bool check(point p){
if(p.X<=0 || p.Y<=0)return 0;
if(p.X>n || p.Y>n)return 0;
if(rec.find(p)!=rec.end())return rec[p];
cout<<"examine ";
cout<<p.X<<" "<<p.Y<<endl;
string ans; cin>>ans;
return rec[p]=(ans[0]=='t');
}
point getLimit(point base,point side,point delta,point invdelta){
while(base!=side){
point mid=(base+side+invdelta)/2;
bool move=0;
if(check(mid)){
point mid2=(base+mid)/2;
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... |