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>
#include "robot.h"
using namespace std;
typedef long long ll;
// Cur, W, S, E, N
void instruct(vector<int> s, int z, char a, bool exp) {
vector<int> nw;
vector<vector<int>> scenarios(1, vector<int>(5));
for (int i = 0; i < 5; i++) {
scenarios[0][i] = s[i] == -9 ? -2 : s[i];
}
for (int i = 0; i < 5; i++) {
ll sz = scenarios.size();
if (s[i] == -1 && !exp) {
for (int j = 0; j < sz; j++) {
nw = scenarios[j];
nw[i] = -2;
scenarios.push_back(nw);
}
}
if (s[i] == -9) {
for (int j = 0; j < sz; j++) {
nw = scenarios[j];
nw[i] = -1;
scenarios.push_back(nw);
nw[i] = 0;
scenarios.push_back(nw);
nw[i] = 1;
scenarios.push_back(nw);
}
}
}
for (auto &e : scenarios) {
set_instruction(e, z, a);
}
}
// Cur, W, S, E, N
void program_pulibot() {
instruct({-9, -9, -9, 0, -9}, 1, 'E', false);
instruct({-9, -9, -2, -2, -9}, 1, 'T', false);
instruct({-9, -9, 0, -1, -9}, 1, 'S', false);
instruct({-9, -9, -1, -1, 0}, 1, 'N', true);
instruct({-9, -9, -2, -1, 0}, 1, 'N', true);
}
# | 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... |