Submission #1068385

#TimeUsernameProblemLanguageResultExecution timeMemory
1068385parsadox2Robot Contest (IOI23_robot)C++17
6 / 100
120 ms5860 KiB
#include "robot.h" #include <bits/stdc++.h> using namespace std; char D[5]; void Solve(vector <int> vec) { if(vec[0] == 0) { for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 1) { set_instruction(vec , 4 , D[i]); return; } set_instruction(vec , 1 , 'H'); return; } if(vec[0] == 2) { for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 3) { set_instruction(vec , 0 , D[i]); return; } return; } if(vec[0] == 3) { for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 2) { set_instruction(vec , 3 , D[i]); return; } for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 4) { set_instruction(vec , 1 , D[i]); return; } for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 1) { set_instruction(vec , 2 , D[i]); return; } return; } if(vec[0] == 4) { set_instruction(vec , 1 , 'H'); return; } if(vec[2] == -2 && vec[3] == -2) { set_instruction(vec , 1 , 'T'); return; } for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 4) { set_instruction(vec , 3 , 'H'); return; } for(int i = 1 ; i <= 4 ; i++) if(vec[i] == 0) { set_instruction(vec , 1 , D[i]); return; } set_instruction(vec , 3 , 'H'); return; } void program_pulibot() { D[1] = 'W'; D[2] = 'S'; D[3] = 'E'; D[4] = 'N'; for(int a = 0 ; a <= 4 ; a++) for(int b = -2 ; b <= 4 ; b++) for(int c = -2 ; c <= 4 ; c++) for(int d = -2 ; d <= 4 ; d++) for(int e = -2 ; e <= 4 ; e++) { vector <int> vec = {a , b , c , d , e}; Solve(vec); } }
#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...