Submission #980984

#TimeUsernameProblemLanguageResultExecution timeMemory
980984vjudge1Robot Contest (IOI23_robot)C++17
Compilation error
0 ms0 KiB
#include "robot.h"
#include <bits/stdc++.h>
#define rep(a,b,c) for(int a=b; a<c; a++)
#define repr(a,b,c) for(int a=b-1; a>c-1; a--)
#define repa(a,b) for(auto a:b)
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ll long long
#define pb push_back

using namespace std;

//0 this, 1 west, 2 south, 3 east, 4 north;

void program_pulibot(){
	//case H>1 && W>1
	set_instruction({0,-2,0,0,-2},1,"S");
	set_instruction({0,-2,-2,0,0},1,"E");
	set_instruction({0,0,-2,-2,0},1,"T");
	//case H=1 && W=1
	set_instruction({0,-2,-2,-2,-2},1,"T");
	//case H>1 && W=1
	set_instruction({0,-2,0,-2,0},1,"S");
	set_instruction({0,-2,-2,-2,0},1,"T");
	//case H=1 && W>1
	set_instruction({0,-2,-2,0,-2},1,"E");
	set_instruction({0,0,-2,-2,-2},1,"T");
}

Compilation message (stderr)

robot.cpp: In function 'void program_pulibot()':
robot.cpp:19:34: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   19 |  set_instruction({0,-2,0,0,-2},1,"S");
      |                                  ^~~
      |                                  |
      |                                  const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:20:34: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   20 |  set_instruction({0,-2,-2,0,0},1,"E");
      |                                  ^~~
      |                                  |
      |                                  const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:21:34: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   21 |  set_instruction({0,0,-2,-2,0},1,"T");
      |                                  ^~~
      |                                  |
      |                                  const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:23:36: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   23 |  set_instruction({0,-2,-2,-2,-2},1,"T");
      |                                    ^~~
      |                                    |
      |                                    const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:25:34: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   25 |  set_instruction({0,-2,0,-2,0},1,"S");
      |                                  ^~~
      |                                  |
      |                                  const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:26:35: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   26 |  set_instruction({0,-2,-2,-2,0},1,"T");
      |                                   ^~~
      |                                   |
      |                                   const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:28:35: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   28 |  set_instruction({0,-2,-2,0,-2},1,"E");
      |                                   ^~~
      |                                   |
      |                                   const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^
robot.cpp:29:35: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   29 |  set_instruction({0,0,-2,-2,-2},1,"T");
      |                                   ^~~
      |                                   |
      |                                   const char*
In file included from robot.cpp:1:
robot.h:4:54: note:   initializing argument 3 of 'void set_instruction(std::vector<int>, int, char)'
    4 | void set_instruction(std::vector<int> S, int Z, char A);
      |                                                 ~~~~~^