Submission #1036734

#TimeUsernameProblemLanguageResultExecution timeMemory
1036734ereringRobot Contest (IOI23_robot)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void set_instruction(int S[5], int Z, char A){ } void program_pulibot(){ int s[5]={0,1,0,0,-2}; set_instruction(s,1,'E'); s={0,-2,0,0,-2}; set_instruction(s,1,'E'); s={0,0,0,-2,1}; set_instruction(s,1,'S'); s={0,0,0,-2,-2}; set_instruction(s,1,'S'); }

Compilation message (stderr)

robot.cpp: In function 'void program_pulibot()':
robot.cpp:9:6: error: assigning to an array from an initializer list
    9 |     s={0,-2,0,0,-2};
      |     ~^~~~~~~~~~~~~~
robot.cpp:11:6: error: assigning to an array from an initializer list
   11 |     s={0,0,0,-2,1};
      |     ~^~~~~~~~~~~~~
robot.cpp:13:6: error: assigning to an array from an initializer list
   13 |     s={0,0,0,-2,-2};
      |     ~^~~~~~~~~~~~~~