이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robot.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define MOD (1000000000)+7;
#define all(x) x.begin(), x.end()
#define en cout << '\n'
const int N = 1e3+100;
void set_instruction(std::vector<int> S, int Z, char A);
void sett(int west, int south, int east, int north){
if(east == 0){
if(south == 0){
set_instruction({0, -2, 0, 0, -2}, 1, 'E');
set_instruction({0, -2, 0, 0, -1}, 1, 'E');
set_instruction({0, -2, 0, 0, 1}, 1, 'E');
set_instruction({0, -2, 0, 0, 0}, 1, 'E');
set_instruction({0, -1, 0, 0, -2}, 1, 'E');
set_instruction({0, -1, 0, 0, -1}, 1, 'E');
set_instruction({0, -1, 0, 0, 1}, 1, 'E');
set_instruction({0, -1, 0, 0, 0}, 1, 'E');
set_instruction({0, 1, 0, 0, -2}, 1, 'E');
set_instruction({0, 1, 0, 0, -1}, 1, 'E');
set_instruction({0, 1, 0, 0, 1}, 1, 'E');
set_instruction({0, 1, 0, 0, 0}, 1, 'E');
set_instruction({0, 0, 0, 0, -2}, 1, 'E');
set_instruction({0, 0, 0, 0, -1}, 1, 'E');
set_instruction({0, 0, 0, 0, 1}, 1, 'E');
set_instruction({0, 0, 0, 0, 0}, 1, 'E');
}else{
set_instruction({0, -2, -2, 0, -2}, 1, 'E');
set_instruction({0, -2, -2, 0, -1}, 1, 'E');
set_instruction({0, -2, -2, 0, 1}, 1, 'E');
set_instruction({0, -2, -2, 0, 0}, 1, 'E');
set_instruction({0, -1, -2, 0, -2}, 1, 'E');
set_instruction({0, -1, -2, 0, -1}, 1, 'E');
set_instruction({0, -1, -2, 0, 1}, 1, 'E');
set_instruction({0, -1, -2, 0, 0}, 1, 'E');
set_instruction({0, 1, -2, 0, -2}, 1, 'E');
set_instruction({0, 1, -2, 0, -1}, 1, 'E');
set_instruction({0, 1, -2, 0, 1}, 1, 'E');
set_instruction({0, 1, -2, 0, 0}, 1, 'E');
set_instruction({0, 0, -2, 0, -2}, 1, 'E');
set_instruction({0, 0, -2, 0, -1}, 1, 'E');
set_instruction({0, 0, -2, 0, 1}, 1, 'E');
set_instruction({0, 0, -2, 0, 0}, 1, 'E');
set_instruction({0, -2, -1, 0, -2}, 1, 'E');
set_instruction({0, -2, -1, 0, -1}, 1, 'E');
set_instruction({0, -2, -1, 0, 1}, 1, 'E');
set_instruction({0, -2, -1, 0, 0}, 1, 'E');
set_instruction({0, -1, -1, 0, -2}, 1, 'E');
set_instruction({0, -1, -1, 0, -1}, 1, 'E');
set_instruction({0, -1, -1, 0, 1}, 1, 'E');
set_instruction({0, -1, -1, 0, 0}, 1, 'E');
set_instruction({0, 1, -1, 0, -2}, 1, 'E');
set_instruction({0, 1, -1, 0, -1}, 1, 'E');
set_instruction({0, 1, -1, 0, 1}, 1, 'E');
set_instruction({0, 1, -1, 0, 0}, 1, 'E');
set_instruction({0, 0, -1, 0, -2}, 1, 'E');
set_instruction({0, 0, -1, 0, -1}, 1, 'E');
set_instruction({0, 0, -1, 0, 1}, 1, 'E');
set_instruction({0, 0, -1, 0, 0}, 1, 'E');
set_instruction({0, -2, 1, 0, -2}, 1, 'E');
set_instruction({0, -2, 1, 0, -1}, 1, 'E');
set_instruction({0, -2, 1, 0, 1}, 1, 'E');
set_instruction({0, -2, 1, 0, 0}, 1, 'E');
set_instruction({0, -1, 1, 0, -2}, 1, 'E');
set_instruction({0, -1, 1, 0, -1}, 1, 'E');
set_instruction({0, -1, 1, 0, 1}, 1, 'E');
set_instruction({0, -1, 1, 0, 0}, 1, 'E');
set_instruction({0, 1, 1, 0, -2}, 1, 'E');
set_instruction({0, 1, 1, 0, -1}, 1, 'E');
set_instruction({0, 1, 1, 0, 1}, 1, 'E');
set_instruction({0, 1, 1, 0, 0}, 1, 'E');
set_instruction({0, 0, 1, 0, -2}, 1, 'E');
set_instruction({0, 0, 1, 0, -1}, 1, 'E');
set_instruction({0, 0, 1, 0, 1}, 1, 'E');
set_instruction({0, 0, 1, 0, 0}, 1, 'E');
}
}else if(south == 0){
set_instruction({0, -2, 0, -2, -2}, 1, 'S');
set_instruction({0, -2, 0, -2, -1}, 1, 'S');
set_instruction({0, -2, 0, -2, 1}, 1, 'S');
set_instruction({0, -2, 0, -2, 0}, 1, 'S');
set_instruction({0, -1, 0, -2, -2}, 1, 'S');
set_instruction({0, -1, 0, -2, -1}, 1, 'S');
set_instruction({0, -1, 0, -2, 1}, 1, 'S');
set_instruction({0, -1, 0, -2, 0}, 1, 'S');
set_instruction({0, 1, 0, -2, -2}, 1, 'S');
set_instruction({0, 1, 0, -2, -1}, 1, 'S');
set_instruction({0, 1, 0, -2, 1}, 1, 'S');
set_instruction({0, 1, 0, -2, 0}, 1, 'S');
set_instruction({0, 0, 0, -2, -2}, 1, 'S');
set_instruction({0, 0, 0, -2, -1}, 1, 'S');
set_instruction({0, 0, 0, -2, 1}, 1, 'S');
set_instruction({0, 0, 0, -2, 0}, 1, 'S');
set_instruction({0, -2, 0, -1, -2}, 1, 'S');
set_instruction({0, -2, 0, -1, -1}, 1, 'S');
set_instruction({0, -2, 0, -1, 1}, 1, 'S');
set_instruction({0, -2, 0, -1, 0}, 1, 'S');
set_instruction({0, -1, 0, -1, -2}, 1, 'S');
set_instruction({0, -1, 0, -1, -1}, 1, 'S');
set_instruction({0, -1, 0, -1, 1}, 1, 'S');
set_instruction({0, -1, 0, -1, 0}, 1, 'S');
set_instruction({0, 1, 0, -1, -2}, 1, 'S');
set_instruction({0, 1, 0, -1, -1}, 1, 'S');
set_instruction({0, 1, 0, -1, 1}, 1, 'S');
set_instruction({0, 1, 0, -1, 0}, 1, 'S');
set_instruction({0, 0, 0, -1, -2}, 1, 'S');
set_instruction({0, 0, 0, -1, -1}, 1, 'S');
set_instruction({0, 0, 0, -1, 1}, 1, 'S');
set_instruction({0, 0, 0, -1, 0}, 1, 'S');
set_instruction({0, -2, 0, 1, -2}, 1, 'S');
set_instruction({0, -2, 0, 1, -1}, 1, 'S');
set_instruction({0, -2, 0, 1, 1}, 1, 'S');
set_instruction({0, -2, 0, 1, 0}, 1, 'S');
set_instruction({0, -1, 0, 1, -2}, 1, 'S');
set_instruction({0, -1, 0, 1, -1}, 1, 'S');
set_instruction({0, -1, 0, 1, 1}, 1, 'S');
set_instruction({0, -1, 0, 1, 0}, 1, 'S');
set_instruction({0, 1, 0, 1, -2}, 1, 'S');
set_instruction({0, 1, 0, 1, -1}, 1, 'S');
set_instruction({0, 1, 0, 1, 1}, 1, 'S');
set_instruction({0, 1, 0, 1, 0}, 1, 'S');
set_instruction({0, 0, 0, 1, -2}, 1, 'S');
set_instruction({0, 0, 0, 1, -1}, 1, 'S');
set_instruction({0, 0, 0, 1, 1}, 1, 'S');
set_instruction({0, 0, 0, 1, 0}, 1, 'S');
}
}
void program_pulibot()
{
sett(1, 0, 0, 1);
sett(1, 0, 1, 1);
sett(1, 1, 0, 1);
set_instruction({0, -2, -2, -2, -2}, 1, 'T');
set_instruction({0, -2, -2, -2, -1}, 1, 'T');
set_instruction({0, -2, -2, -2, 1}, 1, 'T');
set_instruction({0, -2, -2, -2, 0}, 1, 'T');
set_instruction({0, -1, -2, -2, -2}, 1, 'T');
set_instruction({0, -1, -2, -2, -1}, 1, 'T');
set_instruction({0, -1, -2, -2, 1}, 1, 'T');
set_instruction({0, -1, -2, -2, 0}, 1, 'T');
set_instruction({0, 1, -2, -2, -2}, 1, 'T');
set_instruction({0, 1, -2, -2, -1}, 1, 'T');
set_instruction({0, 1, -2, -2, 1}, 1, 'T');
set_instruction({0, 1, -2, -2, 0}, 1, 'T');
set_instruction({0, 0, -2, -2, -2}, 1, 'T');
set_instruction({0, 0, -2, -2, -1}, 1, 'T');
set_instruction({0, 0, -2, -2, 1}, 1, 'T');
set_instruction({0, 0, -2, -2, 0}, 1, 'T');
}
# | 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... |