Submission #884692

#TimeUsernameProblemLanguageResultExecution timeMemory
884692irmuun로봇 대회 (IOI23_robot)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "robot.h"
 
using namespace std;
 
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

//west-zuun
//south-dood
//east-baruun
//north-deed

void program_pulibot(){
    for(int w=-2;w<2;w++){
        for(int s=-2;s<2;s++){
            for(int e=-2;e<1;e++){
                for(int n=-2;n<=0;n++){
                    if(s==-2&&e==-2){
                        set_instruction({0,i,j,k,r},1,'T');
                    }
                    else if(e<0){
                        if(s==-2&&n!=-2){
                            set_instruction({0,i,j,k,r},1,'N');
                        }
                        if(s!=-2&&n==-2){
                            set_instruction({0,i,j,k,r},1,'S');
                        }
                    }
                    else{
                        set_instruction({0,w,s,e,n},1,'E');
                    }
                }
            }
        }
    }
}

Compilation message (stderr)

robot.cpp: In function 'void program_pulibot()':
robot.cpp:24:44: error: 'i' was not declared in this scope
   24 |                         set_instruction({0,i,j,k,r},1,'T');
      |                                            ^
robot.cpp:24:46: error: 'j' was not declared in this scope
   24 |                         set_instruction({0,i,j,k,r},1,'T');
      |                                              ^
robot.cpp:24:48: error: 'k' was not declared in this scope
   24 |                         set_instruction({0,i,j,k,r},1,'T');
      |                                                ^
robot.cpp:24:50: error: 'r' was not declared in this scope
   24 |                         set_instruction({0,i,j,k,r},1,'T');
      |                                                  ^
robot.cpp:24:58: error: could not convert '{0, <expression error>, <expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   24 |                         set_instruction({0,i,j,k,r},1,'T');
      |                                                          ^
      |                                                          |
      |                                                          <brace-enclosed initializer list>
robot.cpp:28:48: error: 'i' was not declared in this scope
   28 |                             set_instruction({0,i,j,k,r},1,'N');
      |                                                ^
robot.cpp:28:50: error: 'j' was not declared in this scope
   28 |                             set_instruction({0,i,j,k,r},1,'N');
      |                                                  ^
robot.cpp:28:52: error: 'k' was not declared in this scope
   28 |                             set_instruction({0,i,j,k,r},1,'N');
      |                                                    ^
robot.cpp:28:54: error: 'r' was not declared in this scope
   28 |                             set_instruction({0,i,j,k,r},1,'N');
      |                                                      ^
robot.cpp:28:62: error: could not convert '{0, <expression error>, <expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   28 |                             set_instruction({0,i,j,k,r},1,'N');
      |                                                              ^
      |                                                              |
      |                                                              <brace-enclosed initializer list>
robot.cpp:31:48: error: 'i' was not declared in this scope
   31 |                             set_instruction({0,i,j,k,r},1,'S');
      |                                                ^
robot.cpp:31:50: error: 'j' was not declared in this scope
   31 |                             set_instruction({0,i,j,k,r},1,'S');
      |                                                  ^
robot.cpp:31:52: error: 'k' was not declared in this scope
   31 |                             set_instruction({0,i,j,k,r},1,'S');
      |                                                    ^
robot.cpp:31:54: error: 'r' was not declared in this scope
   31 |                             set_instruction({0,i,j,k,r},1,'S');
      |                                                      ^
robot.cpp:31:62: error: could not convert '{0, <expression error>, <expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   31 |                             set_instruction({0,i,j,k,r},1,'S');
      |                                                              ^
      |                                                              |
      |                                                              <brace-enclosed initializer list>