# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
79222 | Plurm | Aliens (IOI07_aliens) | C++11 | 3 ms | 592 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;
enum dir{
up, down, lleft, rright
};
int n;
const pair<int,int> NOPE = make_pair(-1,-1);
map<pair<long long,long long>,bool> mp;
bool query(long long x,long long y){
if(x <= 0 || y <= 0 || x > n || y > n) return false;
if(mp.find(make_pair(x,y)) != mp.end()) return mp[make_pair(x,y)];
printf("examine %lld %lld\n",x,y);
fflush(stdout);
char in[8];
scanf("%s",in);
mp[make_pair(x,y)] = in[0] == 't';
return in[0] == 't';
}
pair<int,int> search(long long x,long long y,dir d){
int sstate = 0;
if(d == up){
for(long long i = 1; y+i <= (long long)n; i *= 2ll){
if(query(x,y+i)){
if(sstate == 1){
return make_pair(x,y+i);
}
}else{
if(sstate == 0) sstate = 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... |