Submission #440438

#TimeUsernameProblemLanguageResultExecution timeMemory
440438sam571128Rainforest 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: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)
      |     ^~~