이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robot.h"
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
set<vi> st;
void add(int a,int b,int c,int d,int e,int f,char t){
vi v = {a,b,c,d,e};
if(st.find(v) != st.end())return;
st.insert(v);
cerr<<"ADD: "<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<' '<<f<<' '<<t<<endl;
set_instruction(vi({a,b,c,d,e}),f,t);
}
void add(vi v,int f,char t){
add(v[0],v[1],v[2],v[3],v[4],f,t);
}
const int C = 3;
void program_pulibot(){
for(int i = -2;i<=C;i++){
for(int j = -2;j<=C;j++){
add(0,i,-2,-2,j,1,'H');
add(0,i,-2,-2,2,1,'N');
add(0,2,-2,-2,i,1,'W');
if(i == 1||j == 1)add(2,-2,i,j,-2,1,'T');
}
}
for(int i = -2;i<=C;i++){
for(int j = -2;j<=C;j++){
for(int k = -2;k<=C;k++){
for(int l = -2;l<=C;l++){
bool one = false;
if(i == 1||j == 1||k == 1||l == 1)one = true;
if(one){
if(i == 2)add(2,i,j,k,l,1,'W');
else if(j == 2)add(2,i,j,k,l,1,'S');
else if(k == 2)add(2,i,j,k,l,1,'E');
else if(l == 2)add(2,i,j,k,l,1,'N');
}
else if(!j)add(0,i,j,k,l,2,'S'),add(2,i,j,k,l,2,'S');
else if(!k)add(0,i,j,k,l,2,'E'),add(2,i,j,k,l,2,'E');
else if(i == 2)add(2,i,j,k,l,3,'W'),add(0,i,j,k,l,3,'W');
else if(l == 2)add(2,i,j,k,l,3,'N'),add(0,i,j,k,l,3,'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... |