Submission #1205473

#TimeUsernameProblemLanguageResultExecution timeMemory
1205473jj_masterRainforest Jumps (APIO21_jumps)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int minimum_jumps(int a, int b, int c, int d) { if(b == c) { return 0; } else { return 1; } } int init(int n, vector<int &h) { int k = minimum_jumps(a, b, c, d); return k; }

Compilation message (stderr)

jumps.cpp:15:29: error: template argument 1 is invalid
   15 | int init(int n, vector<int &h)
      |                             ^
jumps.cpp:15:29: error: template argument 2 is invalid
jumps.cpp:15:29: error: template argument 1 is invalid
jumps.cpp:15:29: error: template argument 2 is invalid
jumps.cpp:15:29: error: template argument 1 is invalid
jumps.cpp:15:29: error: template argument 2 is invalid
jumps.cpp:15:29: error: template argument 1 is invalid
jumps.cpp:15:29: error: template argument 2 is invalid
jumps.cpp:15:17: error: invalid template-id
   15 | int init(int n, vector<int &h)
      |                 ^~~~~~
jumps.cpp:4:13: error: expected primary-expression before 'long'
    4 | #define int long long
      |             ^~~~
jumps.cpp:15:24: note: in expansion of macro 'int'
   15 | int init(int n, vector<int &h)
      |                        ^~~
jumps.cpp:4:13: error: expected '>' before 'long'
    4 | #define int long long
      |             ^~~~
jumps.cpp:15:24: note: in expansion of macro 'int'
   15 | int init(int n, vector<int &h)
      |                        ^~~
jumps.cpp:15:17: error: class template placeholder 'std::vector' not permitted in this context
   15 | int init(int n, vector<int &h)
      |                 ^~~~~~
jumps.cpp:15:17: note: use 'auto' for an abbreviated function template
jumps.cpp: In function 'long long int init(...)':
jumps.cpp:17:27: error: 'a' was not declared in this scope
   17 |     int k = minimum_jumps(a, b, c, d);
      |                           ^
jumps.cpp:17:30: error: 'b' was not declared in this scope
   17 |     int k = minimum_jumps(a, b, c, d);
      |                              ^
jumps.cpp:17:33: error: 'c' was not declared in this scope
   17 |     int k = minimum_jumps(a, b, c, d);
      |                                 ^
jumps.cpp:17:36: error: 'd' was not declared in this scope
   17 |     int k = minimum_jumps(a, b, c, d);
      |                                    ^