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 "robot.h"
#include<bits/stdc++.h>
using namespace std;
int COL;
char ACT;
void program_bot(int top,int left,int right,int down,int cur){
if(left==-2&&right==-2)
return COL=0,void(ACT='H');
if(top==-2&&down==-2)
return COL=0,void(ACT='H');
if(right==down&&right==-2)
return COL=1,void(ACT='T');
vector<int>v[5];
v[top+2].push_back('N');
v[down+2].push_back('S');
v[right+2].push_back('E');
v[left+2].push_back('W');
if(v[2].empty()&&v[3].empty())
return COL=0,void(ACT='H');
if(v[2].empty())
return COL=2,void(ACT=v[3][0]);
COL=1;
return void(ACT=v[2][0]);
}
void program_pulibot(){
for(int top=-2;top<3;top++)
for(int left=-2;left<3;left++)
for(int right=-2;right<3;right++)
for(int bot=-2;bot<3;bot++)
for(int cur=0;cur<3;cur++)
program_bot(top,left,right,bot,cur),
set_instruction({cur,left,bot,right,top},COL,ACT);
}
# | 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... |