Submission #1066779

#TimeUsernameProblemLanguageResultExecution timeMemory
1066779Gromp15Robot Contest (IOI23_robot)C++17
16 / 100
92 ms5968 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...