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>
#include "robot.h"
using namespace std;
#define pb push_back
#define pii pair<int,int>
#define F first
#define S second
#define sz(s) (int)s.size()
#define all(v) v.begin(),v.end()
#define ppb pop_back
vector<int> s;
void rec(){
if(sz(s)==5){
if(s[0]<0)return;
// cerr<<sz(s)<<"\n";
if(s[2]==0){
set_instruction(s,1,'S');
}
else if(s[3]==0){
set_instruction(s,1,'E');
}
else{
if(s[2]==-2&&s[3]==-2){
set_instruction(s,1,'T');
}
else if(s[1]==1){
set_instruction(s,2,'W');
}
else if(s[4]==1){
set_instruction(s,2,'N');
}
}
return;
}
for(int i=-2;i<=2;i++){
s.pb(i);
rec();
s.ppb();
}
}
void program_pulibot(){
// return;
rec();
}
# | 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... |