# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
905160 | Ludissey | Robot Contest (IOI23_robot) | C++17 | 101 ms | 6224 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 "robot.h"
#include <bits/stdc++.h>
using namespace std;
void program_pulibot()
{
// H W S E N
//start
for (int H = -2; H <= 4; H++)
{
for (int W = -2; W <= 4; W++)
{
for (int S = -2; S <= 4; S++)
{
for (int E = -2; E <= 4; E++)
{
for (int N = -2; N <= 4; N++)
{
int c=2;
char dir='E';
if(S==-2&&E==-2){
c=1;
if(H==1){
if(E==2) dir='E';
else if(N==2) dir='N';
else if(S==2) dir='S';
else if(W==2) dir='W';
else dir='H';
}
else dir='H';
}
else if(E==1||N==1||S==1||W==1){
c=1;
if(E==3||N==3||S==3||W==3) {
c=4;
if(E==3) dir='E';
else if(N==3) dir='N';
else if(S==3) dir='S';
else if(W==3) dir='W';
}
else if(N==-2&&W==-2) dir='T';
else if(E==2) dir='E';
else if(N==2) dir='N';
else if(S==2) dir='S';
else if(W==2) dir='W';
}
else if(E==4||N==4||S==4||W==4){
c=0;
if(E==3||N==3||S==3||W==3) {
c=4;
if(E==3) dir='E';
else if(N==3) dir='N';
else if(S==3) dir='S';
else if(W==3) dir='W';
}else if(H=='3'){
c=0;
if(E==4) dir='E';
else if(N==4) dir='N';
else if(S==4) dir='S';
else if(W==4) dir='W';
}
else if(E==4) dir='E';
else if(N==4) dir='N';
else if(S==4) dir='S';
else if(W==4) dir='W';
}
else if(E==0) dir='E';
else if(N==0) dir='N';
else if(S==0) dir='S';
else if(W==0) dir='W';
else{
c=3;
if(E==2) dir='E';
else if(N==2) dir='N';
else if(S==2) dir='S';
else if(W==2) dir='W';
}
vector<int> s(5);
s[0]=H;
s[1]=W;
s[2]=S;
s[3]=E;
s[4]=N;
set_instruction(s, c, dir);
}
}
}
}
}
}
# | 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... |