이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robot.h"
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define F first
#define S second
#define ld long double
#define sz(x) (ll)x.size()
#define MID ((l+r)/2)
#define pb push_back
#define dbg(x) cout<<#x<<": "<<x<<endl;
typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;
void printVct(vi &v){
for (ll i=0; i<sz(v); i++){
cout<<v[i]<<" ";
}
cout<<endl;
}
void program_pulibot()
{
for (ll c = 0; c<2; c++){
for (ll i = -2; i<=2; i++){
for (ll j =-2; j<=2; j++){
for (ll k = -2; k<=2; k++){
for (ll z = -2; z<=2; z++){
if (k == -2 && j == -2){
set_instruction({c, i, j, k, z}, 1, 'T');
}
else if (k == 0){ //can go east
set_instruction({c, i, j, k, z}, 1, 'E');
}
else if (j == 0){
set_instruction({c, i, j, k, z}, 1, 'S');
}
//else if (z == 0){
// set_instruction({c, i, j, k, z}, 1, 'N');
//}
else{
if (k == 1){ //can go east
set_instruction({c, i, j, k, z}, 2, 'E');
}
else if (j == 1){
set_instruction({c, i, j, k, z}, 2, 'S');
}
else if (z == 1){
set_instruction({c, i, j, k, z}, 2, 'N');
}
else if (i == 1){
set_instruction({c, i, j, k, z}, 2, 'W');
}
}
}
}
}
}
}
// for (ll i = -2; i<=1; i++){
// for (ll j =-2; j<=1; j++){
// for (ll k = -2; k<=1; k++){
// set_instruction({0, i, j, k, 0}, 1, 'N');
// set_instruction({0, i, j, 0, k}, 1, 'E');
// set_instruction({0, i, 0, j, k}, 1, 'S');
// set_instruction({0, 0, i, j, k}, 1, 'W');
// }
// }
// }
// set_instruction({0, -2, 0, 0, -2}, 1, 'E');
// set_instruction({0, 1, 0, 0, -2}, 1, 'E');
// set_instruction({0, 1, 0, -2, -2}, 1, 'S');
// set_instruction({0, 0, 0, -2, 1}, 1, 'S');
// set_instruction({0, 0, -2, -2, 1}, 1, 'T');
// set_instruction({0, 1, -1, 0, -2}, 1, 'E');
// set_instruction({0, 0, 0, -2, -2}, 1, 'W');
// set_instruction({0, 0, 0, 0, -2}, 1, 'W');
// set_instruction({0, -2, 0, 0, -2}, 1, 'S');
// set_instruction({0, -2, 0, 0, 0}, 1, 'S');
// set_instruction({0, -2, -2, 0, 0}, 1, 'T');
}
/*
set_instruction({0, i, j, k, 0}, 1, 'N');
set_instruction({0, i, j, 0, k}, 1, 'E');
set_instruction({0, i, 0, j, k}, 1, 'S');
set_instruction({0, 0, i, j, k}, 1, 'W');
*/
# | 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... |