제출 #848074

#제출 시각아이디문제언어결과실행 시간메모리
848074I_love_Hoang_Yen로봇 대회 (IOI23_robot)C++17
25 / 100
155 ms5840 KiB
#include "robot.h" #include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a),_##i##_b=(b); i<=_##i##_b; i++) void subtask1() { FOR(cur,0,1) FOR(west,-2,1) FOR(south,-2,1) FOR(east,-2,1) FOR(north,-2,1) { vector<int> state {cur, west, south, east, north}; if (south == -2 && east == -2) { // final state -> terminate set_instruction(state, 1, 'T'); } else if (east == -2) { set_instruction(state, 1, 'S'); } else { set_instruction(state, 1, 'E'); } } } void subtask2() { FOR(cur,0,1) FOR(west,-2,1) FOR(south,-2,1) FOR(east,-2,1) FOR(north,-2,1) { vector<int> state {cur, west, south, east, north}; if (south == -2 && east == -2) { // final state -> terminate set_instruction(state, 1, 'T'); } else if (east == 0) { set_instruction(state, 1, 'E'); } else if (south == 0) { set_instruction(state, 1, 'S'); } else if (north == 0) { set_instruction(state, 1, 'N'); } } } void subtask3() { FOR(cur,0,2) FOR(west,-2,2) FOR(south,-2,2) FOR(east,-2,2) FOR(north,-2,2) { vector<int> state {cur, west, south, east, north}; if (south == -2 && east == -2) { // final state -> terminate set_instruction(state, 1, 'T'); } else if (east == 0) { set_instruction(state, 1, 'E'); } else if (south == 0) { set_instruction(state, 1, 'S'); } else if (north == 0) { set_instruction(state, 1, 'N'); } else if (west == 0) { set_instruction(state, 1, 'W'); } else if (north == 1) { set_instruction(state, 2, 'N'); } else if (west == 1) { set_instruction(state, 2, 'W'); } else if (south == 1) { set_instruction(state, 2, 'S'); } else if (east == 1) { set_instruction(state, 2, 'E'); } } } void program_pulibot() { subtask3(); }
#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...