Submission #553737

#TimeUsernameProblemLanguageResultExecution timeMemory
553737Zhora_004Rainforest Jumps (APIO21_jumps)C++17
Compilation error
0 ms0 KiB
#include "jumps.h" #include <vector> using namespaces std; int n; vector<int> h; void init(int N, std::vector<int> H) { n = N; h = H; } int minimum_jumps(int A, int B, int C, int D) { return c - b; }

Compilation message (stderr)

jumps.cpp:5:7: error: expected nested-name-specifier before 'namespaces'
    5 | using namespaces std;
      |       ^~~~~~~~~~
jumps.cpp:7:1: error: 'vector' does not name a type
    7 | vector<int> h;
      | ^~~~~~
jumps.cpp: In function 'void init(int, std::vector<int>)':
jumps.cpp:11:2: error: 'h' was not declared in this scope
   11 |  h = H;
      |  ^
jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:15:9: error: 'c' was not declared in this scope
   15 |  return c - b;
      |         ^
jumps.cpp:15:13: error: 'b' was not declared in this scope
   15 |  return c - b;
      |             ^