Submission #639074

#TimeUsernameProblemLanguageResultExecution timeMemory
639074alexx_stefanCONSUL (info1cup19_consul)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include<bits/stdc++.h> void solve(int n) { /// insert your code /// for example for (int i=1;i<=min(n,25);i++) { int x=kth(i); if (cnt(x)>n/3) { say_answer(x); return ; } } say_answer(-1); }

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:7:21: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |     for (int i=1;i<=min(n,25);i++)
      |                     ^~~
      |                     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 consul.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
 3474 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~