제출 #953073

#제출 시각아이디문제언어결과실행 시간메모리
953073MilosMilutinovic로봇 대회 (IOI23_robot)C++17
컴파일 에러
0 ms0 KiB
#include "robot.h" void program_pulibot(){ for(int x=0;x<2;x++){ for(int b=-2;b<=2;b++){ for(int c=-2;c<=2;c++){ for(int d=-2;d<=2;d++){ if(b==-2&&c==-2) set_instruction({x,a,b,c,d},1,'T'); else if(c==0) set_instruction({x,a,b,c,d},1,'E'); else if(b==0) set_instruction({x,a,b,c,d},1,'S'); else if(d==0) set_instruction({x,a,b,c,d},1,'N'); else if(a==0) set_instruction({x,a,b,c,d},1,'W'); else{ if(c==1) set_instruction({x,a,b,c,d,2,'E'}); else if(b==1) set_instruction({x,a,b,c,d,2,'S'}); else if(d==1) set_instruction({x,a,b,c,d,2,'N'}); else set_instruction({x,a,b,c,d,2,'W'}); } } } } } }

컴파일 시 표준 에러 (stderr) 메시지

robot.cpp: In function 'void program_pulibot()':
robot.cpp:8:57: error: 'a' was not declared in this scope
    8 |                     if(b==-2&&c==-2) set_instruction({x,a,b,c,d},1,'T');
      |                                                         ^
robot.cpp:8:71: error: could not convert '{x, <expression error>, b, c, d}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    8 |                     if(b==-2&&c==-2) set_instruction({x,a,b,c,d},1,'T');
      |                                                                       ^
      |                                                                       |
      |                                                                       <brace-enclosed initializer list>
robot.cpp:9:54: error: 'a' was not declared in this scope
    9 |                     else if(c==0) set_instruction({x,a,b,c,d},1,'E');
      |                                                      ^
robot.cpp:9:68: error: could not convert '{x, <expression error>, b, c, d}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    9 |                     else if(c==0) set_instruction({x,a,b,c,d},1,'E');
      |                                                                    ^
      |                                                                    |
      |                                                                    <brace-enclosed initializer list>
robot.cpp:10:54: error: 'a' was not declared in this scope
   10 |                     else if(b==0) set_instruction({x,a,b,c,d},1,'S');
      |                                                      ^
robot.cpp:10:68: error: could not convert '{x, <expression error>, b, c, d}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   10 |                     else if(b==0) set_instruction({x,a,b,c,d},1,'S');
      |                                                                    ^
      |                                                                    |
      |                                                                    <brace-enclosed initializer list>
robot.cpp:11:54: error: 'a' was not declared in this scope
   11 |                     else if(d==0) set_instruction({x,a,b,c,d},1,'N');
      |                                                      ^
robot.cpp:11:68: error: could not convert '{x, <expression error>, b, c, d}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   11 |                     else if(d==0) set_instruction({x,a,b,c,d},1,'N');
      |                                                                    ^
      |                                                                    |
      |                                                                    <brace-enclosed initializer list>
robot.cpp:12:29: error: 'a' was not declared in this scope
   12 |                     else if(a==0) set_instruction({x,a,b,c,d},1,'W');
      |                             ^
robot.cpp:12:68: error: could not convert '{x, a, b, c, d}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   12 |                     else if(a==0) set_instruction({x,a,b,c,d},1,'W');
      |                                                                    ^
      |                                                                    |
      |                                                                    <brace-enclosed initializer list>
robot.cpp:14:67: error: could not convert '{x, a, b, c, d, 2, 'E'}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   14 |                         if(c==1) set_instruction({x,a,b,c,d,2,'E'});
      |                                                                   ^
      |                                                                   |
      |                                                                   <brace-enclosed initializer list>
robot.cpp:15:72: error: could not convert '{x, a, b, c, d, 2, 'S'}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   15 |                         else if(b==1) set_instruction({x,a,b,c,d,2,'S'});
      |                                                                        ^
      |                                                                        |
      |                                                                        <brace-enclosed initializer list>
robot.cpp:16:72: error: could not convert '{x, a, b, c, d, 2, 'N'}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   16 |                         else if(d==1) set_instruction({x,a,b,c,d,2,'N'});
      |                                                                        ^
      |                                                                        |
      |                                                                        <brace-enclosed initializer list>
robot.cpp:17:63: error: could not convert '{x, a, b, c, d, 2, 'W'}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   17 |                         else set_instruction({x,a,b,c,d,2,'W'});
      |                                                               ^
      |                                                               |
      |                                                               <brace-enclosed initializer list>