제출 #1046512

#제출 시각아이디문제언어결과실행 시간메모리
10465120npata로봇 대회 (IOI23_robot)C++17
10 / 100
76 ms5820 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, 5> 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, 5> cur, int i) { if(i==5) { auto action = get_action(cur); set_instruction({cur[0], cur[1], cur[2], cur[3], cur[4]}, 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); }
#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...