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>
#define elif else if
#define x {i,j,k,l,n}
using namespace std;
//WSEN
void program_pulibot(){
for (int i=-2;i<=4;i++){
for (int j=-2;j<=4;j++){
for (int k=-2;k<=4;k++){
for (int l=-2;l<=4;l++){
for (int n=-2;n<=4;n++){
if (k==-2 && l==-2){
if (j==3) set_instruction(x,1,'W');
else set_instruction(x,1,'N');
continue;
}
if (i==3){
if (k==1 || l==1){
set_instruction(x,1,'H');
continue;
}
if (k && l){
set_instruction(x,2,'H');
continue;
}
if (k) set_instruction(x,3,'E');
else set_instruction(x,3,'S');
continue;
}
if (i==0){
set_instruction(x,3,'H');
continue;
}
if (i==1){
if (k==2) set_instruction(x,1,'S');
elif (l==2) set_instruction(x,1,'E');
elif (j==3) set_instruction(x,1,'W');
elif (n==3) set_instruction(x,1,'N');
elif (j==-2 && n==-2){
set_instruction(x,1,'T');
continue;
}
continue;
}
if (i==2){
if (j==3) set_instruction(x,2,'W');
elif (n==3) set_instruction(x,2,'N');
else set_instruction(x,4,'H');
continue;
}
if (i==4){
if (k==2) set_instruction(x,4,'S');
elif (l==2) set_instruction(x,4,'E');
elif (j==4) set_instruction(x,0,'W');
elif (n==4) set_instruction(x,0,'N');
elif (j==1) set_instruction(x,0,'W');
else set_instruction(x,0,'N');
continue;
}
}
}
}
}
}return;
}
# | 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... |