#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int ll
#include "grader_consul.h"
map<int,int> mp;
bool vis[1005];
void solve(int n){
for(int i=1;i<=n;i++){
vis[i] = false;
}
mp.clear();
srand(314);
for(int i=1;i<=50;i++){
int curr = rand()%n+1;
while(vis[curr]){
curr = rand()%n+1;
}
vis[curr] = true;
mp[kth(curr)]++;
}
vector<vector<int>> v;
for(pair<int,int> i:mp){
v.push_back({i.second,i.first});
}
sort(v.begin(),v.end(),greater<vector<int>>());
int vs = v.size();
for(int i=0;i<min(vs,10);i++){
if(cnt(v[i][1])>n/3){
say_answer(v[i][1]);
return;
}
}
say_answer(-1);
}
Compilation message
consul.cpp:6:10: fatal error: grader_consul.h: No such file or directory
6 | #include "grader_consul.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.