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>
using namespace std;
#include "robot.h"
typedef pair<int, int> pii;
#define f first
#define s second
void program_pulibot()
{
vector<int> S(5);
vector<pair<int, char>> directions =
{
{3, 'E'}, {2, 'S'}, {4, 'N'}, {1, 'W'}};
for (S[0] = 0; S[0] <= 1; S[0]++)
{
for (S[1] = -2; S[1] <= 1; S[1]++)
{
for (S[2] = -2; S[2] <= 1; S[2]++)
{
for (S[3] = -2; S[3] <= 1; S[3]++)
{
for (S[4] = -2; S[4] <= 1; S[4]++)
{
if (S[2] == -2 && S[3] == -2)
{
set_instruction(S, 1, 'T');
continue;
}
for (pair<int, char> p : directions)
{
if (S[p.f] == 0)
{
set_instruction(S, 1, p.s);
break;
}
}
}
}
}
}
}
}
# | 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... |