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()
{
string ord = "WSEN";
auto dfs = [&](auto&& s, vector<int> res, char who) -> void {
if (res.size() == 5) {
set_instruction(res, 1, who);
return;
}
if (who == 'T') {
res.emplace_back(0);
s(s, res, ord[sz(res) - 2]);
res.pop_back();
}
for (int x : {-1, -2, 1}) {
res.emplace_back(x);
s(s, res, who);
res.pop_back();
}
};
dfs(dfs, {0}, 'T');
}
# | 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... |