Submission #1066812

#TimeUsernameProblemLanguageResultExecution timeMemory
1066812pccRobot Contest (IOI23_robot)C++17
15 / 100
136 ms5840 KiB
#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(!i)add(0,i,j,k,l,2,'W'),add(2,i,j,k,l,2,'W'); 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(!l)add(0,i,j,k,l,2,'N'),add(2,i,j,k,l,2,'N'); else if(i == 2)add(2,i,j,k,l,3,'W'),add(0,i,j,k,l,3,'W'); else if(j == 2)add(2,i,j,k,l,3,'S'),add(0,i,j,k,l,3,'S'); else if(k == 2)add(2,i,j,k,l,3,'E'),add(0,i,j,k,l,3,'E'); else if(l == 2)add(2,i,j,k,l,3,'N'),add(0,i,j,k,l,3,'N'); } } } } }
#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...