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"
#define sz(x) (int)x.size()
using namespace std;
void program_pulibot()
{
set<vector<int>> vis;
auto go = [&](vector<int> v, int col, char who, vector<int> repl) {
auto dfs = [&](auto&& s, vector<int> cur, int on) -> void {
if (on == 5) {
if (vis.count(cur)) return;
vis.insert(cur);
set_instruction(cur, col, who);
return;
}
if (v[on] == -3) {
for (int p : repl) {
cur[on] = p;
s(s, cur, on+1);
}
}
else s(s, cur, on+1);
};
dfs(dfs, v, 0);
};
go({-3, -3, -2, -2, -3}, 1, 'T', {-2, -1, 0, 1});
go({0, -3, -3, 0, -3}, 1, 'E', {-2, -1, 0, 1});
go({0, -3, 0, -3, -3}, 1, 'S', {-2, -1, 0, 1});
go({0, -3, -3, -3, 0}, 1, 'N', {-2, -1, 0, 1});
}
# | 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... |