Submission #369468

#TimeUsernameProblemLanguageResultExecution timeMemory
369468sadCONSUL (info1cup19_consul)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "bits/stdc++.h" #define fi first #define se second #define pb push_back #define ll long long void solve(int n) { for(int i=1;i<=min(25,n);i++) { int x=kth(i); int y=cnt(x); if(y>n/3){say_answer(x);return;} }return say_answer(-1); }

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:9:20: error: 'min' was not declared in this scope; did you mean 'std::min'?
    9 |     for(int i=1;i<=min(25,n);i++)
      |                    ^~~
      |                    std::min
In file included from /usr/include/c++/9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
                 from consul.cpp:2:
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: 'std::min' declared here
 3450 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~