Submission #777201

# Submission time Handle Problem Language Result Execution time Memory
777201 2023-07-08T19:00:32 Z LeaRouse CONSUL (info1cup19_consul) C++14
Compilation error
0 ms 0 KB
#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

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);
      |                    ^~~~