제출 #1049321

#제출 시각아이디문제언어결과실행 시간메모리
1049321AIF_is_carving로봇 대회 (IOI23_robot)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;

void program_pulibot(){


    for(int i = 0; i<=118; i++){
        vector<int> s(5, 0);

        int x = i;
        s[1] = -(x%3); x/=3;
        s[2] = -(x%3); x/=3;
        s[3] = -(x%3); x/=3;
        s[4] = -(x%3); x/=3;


        if(s[3] == 0) set_instruction(s, 1, 'E');
        else if(s[2]!=0 && s[4] == 0) set_instruction(s, 1, 'N');
        else if(s[2]==0 && s[4] != 0) set_instruction(s, 1, 'S');
        else set_instruction(s, 1, 'T');

    }
    

    return;
}



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

robot.cpp: In function 'void program_pulibot()':
robot.cpp:19:23: error: 'set_instruction' was not declared in this scope
   19 |         if(s[3] == 0) set_instruction(s, 1, 'E');
      |                       ^~~~~~~~~~~~~~~
robot.cpp:20:39: error: 'set_instruction' was not declared in this scope
   20 |         else if(s[2]!=0 && s[4] == 0) set_instruction(s, 1, 'N');
      |                                       ^~~~~~~~~~~~~~~
robot.cpp:21:39: error: 'set_instruction' was not declared in this scope
   21 |         else if(s[2]==0 && s[4] != 0) set_instruction(s, 1, 'S');
      |                                       ^~~~~~~~~~~~~~~
robot.cpp:22:14: error: 'set_instruction' was not declared in this scope
   22 |         else set_instruction(s, 1, 'T');
      |              ^~~~~~~~~~~~~~~