Submission #1067599

#TimeUsernameProblemLanguageResultExecution timeMemory
1067599Ahmed57Robot Contest (IOI23_robot)C++17
Compilation error
0 ms0 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_interaction({c,w,s,e,n},East,'E'); }else{ set_interaction({c,w,s,e,n},South,'S'); } }else if(s==Bound&&e==Bound){ set_interaction({c,w,s,e,n},East,'E'); }else{ for(int i = 0;i<4;i++){ if(lol[i]-2==(i+2)%4){ set_interaction({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_interaction({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_interaction({c,w,s,e,n},c,arr[i]); done = 1; } } if(done)continue; set_anteraction({c,w,s,e,n},(path||(w==Bound&&n==Bound))?Path:Empty,(e==Bound||s==Bound)?'T':arr[(c+1)%4]); } } } } } } } }

Compilation message (stderr)

robot.cpp: In function 'void program_pulibot()':
robot.cpp:30:37: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   30 |                                     set_interaction({c,w,s,e,n},East,'E');
      |                                     ^~~~~~~~~~~~~~~
      |                                     set_instruction
robot.cpp:32:37: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   32 |                                     set_interaction({c,w,s,e,n},South,'S');
      |                                     ^~~~~~~~~~~~~~~
      |                                     set_instruction
robot.cpp:35:33: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   35 |                                 set_interaction({c,w,s,e,n},East,'E');
      |                                 ^~~~~~~~~~~~~~~
      |                                 set_instruction
robot.cpp:39:41: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   39 |                                         set_interaction({c,w,s,e,n},West+i,arr[i]);
      |                                         ^~~~~~~~~~~~~~~
      |                                         set_instruction
robot.cpp:49:41: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   49 |                                         set_interaction({c,w,s,e,n},West+i,arr[i]);
      |                                         ^~~~~~~~~~~~~~~
      |                                         set_instruction
robot.cpp:62:41: error: 'set_interaction' was not declared in this scope; did you mean 'set_instruction'?
   62 |                                         set_interaction({c,w,s,e,n},c,arr[i]);
      |                                         ^~~~~~~~~~~~~~~
      |                                         set_instruction
robot.cpp:67:33: error: 'set_anteraction' was not declared in this scope; did you mean 'set_instruction'?
   67 |                                 set_anteraction({c,w,s,e,n},(path||(w==Bound&&n==Bound))?Path:Empty,(e==Bound||s==Bound)?'T':arr[(c+1)%4]);
      |                                 ^~~~~~~~~~~~~~~
      |                                 set_instruction