Submission #440437

#TimeUsernameProblemLanguageResultExecution timeMemory
440437sam571128Rainforest Jumps (APIO21_jumps)C++17
Compilation error
0 ms0 KiB
#include "jumps.h" #include <bits/stdc++.h> void init(int N, std::vector<int> H) { } int minimum_jumps(int A, int B, int C, int D) { return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)}); }

Compilation message (stderr)

jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:10:21: error: 'a' was not declared in this scope
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |                     ^
jumps.cpp:10:23: error: 'd' was not declared in this scope
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |                       ^
jumps.cpp:10:32: error: 'c' was not declared in this scope
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |                                ^
jumps.cpp:10:39: error: 'b' was not declared in this scope
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |                                       ^
jumps.cpp:10:44: error: 'abc' was not declared in this scope; did you mean 'abs'?
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |                                            ^~~
      |                                            abs
jumps.cpp:10:12: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 |     return min({abs(a-d),abs(a-c),abs(b-c),abc(b-d)});
      |            ^~~
      |            std::min
In file included from /usr/include/c++/10/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from jumps.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
 3474 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~