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 Solve(vector <int> vec)
{
if(vec[0] == 0)
{
set_instruction(vec , 1 , 'H');
return;
}
if(vec[0] != 1)
return;
if(vec[2] == -2 && vec[3] == -2)
{
set_instruction(vec , 1 , 'T');
return;
}
if(vec[2] == 0)
{
set_instruction(vec , 1 , 'S');
return;
}
if(vec[3] == 0)
{
set_instruction(vec , 1 , 'E');
return;
}
if(vec[1] == 0)
{
set_instruction(vec , 1 , 'W');
return;
}
if(vec[4] == 0)
{
set_instruction(vec , 1 , 'N');
return;
}
if(vec[4] == 1)
{
set_instruction(vec , 2 , 'N');
return;
}
if(vec[1] == 1)
{
set_instruction(vec , 2 , 'W');
return;
}
if(vec[3] == 1)
{
set_instruction(vec , 2 , 'E');
return;
}
if(vec[2] == 1)
{
set_instruction(vec , 2 , 'S');
return;
}
}
void program_pulibot()
{
for(int a = 0 ; a <= 2 ; a++)
for(int b = -2 ; b <= 2 ; b++)
for(int c = -2 ; c <= 2 ; c++)
for(int d = -2 ; d <= 2 ; d++)
for(int e = -2 ; e <= 2 ; e++)
{
vector <int> vec = {a , b , c , d , e};
Solve(vec);
}
}
# | 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... |