Submission #777201

#TimeUsernameProblemLanguageResultExecution timeMemory
777201LeaRouseCONSUL (info1cup19_consul)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include <map> #define ll long long using namespace std; void solve(int n){ for(int i=1;i<25;i++){ int nc=kth(rand()%n +1); int awa=cnt(nc); if(awa>n/3){ say_answer(awa); return; } } say_answer(-1); }

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:7:20: error: 'rand' was not declared in this scope
    7 |         int nc=kth(rand()%n +1);
      |                    ^~~~