제출 #1067601

#제출 시각아이디문제언어결과실행 시간메모리
1067601Ahmed57로봇 대회 (IOI23_robot)C++17
0 / 100
1 ms348 KiB
#include "bits/stdc++.h" #include "robot.h" using namespace std; //2 WEST //3 SOUTH //4 EAST //5 NORTH enum Id { Bound = -2, Block, Empty, Path, West, South, East, North }; char arr[] = {'W','S','E','N'}; void program_pulibot(){ for(int c = 0;c<=5;c++){ for(int w = -2;w<=5;w++){ for(int s = -2;s<=5;s++){ for(int e = -2;e<=5;e++){ for(int n = -2;n<=5;n++){ vector<int> lol = {w,s,e,n}; if(c==0){ if(n==Bound&&w==Bound){ if(s==Bound){ set_instruction({c,w,s,e,n},East,'E'); }else{ set_instruction({c,w,s,e,n},South,'S'); } }else if(s==Bound&&e==Bound){ set_instruction({c,w,s,e,n},East,'E'); }else{ for(int i = 0;i<4;i++){ if(lol[i]-2==(i+2)%4){ set_instruction({c,w,s,e,n},West+i,arr[i]); break; } } } }else{ if(lol[c-2]-2==(c+2)%4){ for(int e = 1;e<=4;e++){ int i = (c-2+e)%4; if(lol[i]-2==(i+2)%4){ set_instruction({c,w,s,e,n},West+i,arr[i]); break; } } }else{ bool path = 0; bool done = 0; for(int e = 1;e<=4;e++){ int i = (c-2+e)%4; if(lol[i]==1){ path = 1; } if(lol[i]-2==(i+2)%4){ set_instruction({c,w,s,e,n},c,arr[i]); done = 1; } } if(done)continue; set_instruction({c,w,s,e,n},(path||(w==Bound&&n==Bound))?Path:Empty,(e==Bound||s==Bound)?'T':arr[(c+1)%4]); } } } } } } } }
#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...