이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 program_pulibot() {
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');
}
}
}
# | 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... |