Submission #1046507

#TimeUsernameProblemLanguageResultExecution timeMemory
10465070npataRobot Contest (IOI23_robot)C++17
0 / 100
1 ms348 KiB
#include "robot.h" #include<bits/stdc++.h> using namespace std; #define arr array #define si set_instruction pair<char, int> get_action(arr<int, 6> state) { if(state[3] == -2) { if(state[4] == -2) return {'S', 1}; return {'T', 1}; } if(state[3] == 0) return {'E', 1}; if(state[2] == -2) return {'N', 1}; return {'S', 1}; } void all_state(arr<int, 6> cur, int i) { if(i==6) { auto action = get_action(cur); set_instruction({cur[0], cur[1], cur[2], cur[3], cur[4], cur[5]}, action.second, action.first); return; } cur[i] = -2; all_state(cur, i+1); cur[i] = -1; all_state(cur, i+1); cur[i] = 0; all_state(cur, i+1); cur[i] = 1; all_state(cur, i+1); } // self, west, south, east, north void program_pulibot() { all_state({0, 0, 0, 0, 0, 0}, 0); }
#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...