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 <vector>
void a(std::vector<int> x,int t,char y){set_instruction(x,t,y);}
void program_pulibot(){
for (int s = -2; s <= 5; s++){
for (int e = -2; e <= 5; e++){
for (int n = -2; n <= 5; n++){
for (int w = -2; w <= 5; w++){
if (s==1 || e==1 || n==1 || w==1){
if (s>1){
for (int x = 0; x <= 5; x++){
a({x,w,s,e,n},1,'S');
}
}
else if (e>1){
for (int x = 0; x <= 5; x++){
a({x,w,s,e,n},1,'E');
}
}
else if (n>1){
for (int x = 0; x <= 5; x++){
a({x,w,s,e,n},1,'N');
}
}
else if (w>1){
for (int x = 0; x <= 5; x++){
a({x,w,s,e,n},1,'W');
}
}
else {
for (int x = 0; x <= 5; x++){
a({x,w,s,e,n},1,'T');
}
}
continue;
}
if (e==-2 && s==-2){
if (n>0){
a({0,w,s,e,n},1,'N');
}
else {
a({0,w,s,e,n},1,'W');
}
continue;
}
else if (e<0 && s<0){
if (n>0){
a({0,w,s,e,n},0,'N');
}
else {
a({0,w,s,e,n},0,'W');
}
continue;
}
if (e!=0){
a({0,w,s,e,n},2,'H');
}
else {
a({0,w,s,e,n},2,'E');
}
if (n!=0){
a({2,w,s,e,n},3,'H');
}
else {
a({2,w,s,e,n},3,'N');
}
if (s!=0){
a({3,w,s,e,n},4,'H');
}
else {
a({3,w,s,e,n},4,'S');
}
if (w!=0){
a({4,w,s,e,n},5,'H');
}
else {
a({4,w,s,e,n},5,'W');
}
if (w>0){
a({5,w,s,e,n},0,'W');
}
else if (n>0){
a({5,w,s,e,n},0,'N');
}
else if (s>0){
a({5,w,s,e,n},0,'S');
}
else {
a({5,w,s,e,n},0,'E');
}
}
}
}
}
}
# | 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... |