This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include <bits/stdc++.h>
#define F0R(i,a) for (int i = 0; i < (a); ++i)
#define pb push_back
#define f first
#define s second
using namespace std;
void solve(int n)
{
srand(2358198);
map<int,int> m;
F0R(i,30) {
int ind = rand()%n+1;
int x = kth(ind);
m[x] ++;
}
vector<pair<int,int>> tri;
for (auto& t: m) tri.pb({t.s,t.f});
sort(tri.rbegin(),tri.rend());
for (auto& t: tri) if (3*cnt(t.s) > n) { say_answer(t.s); return; }
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |