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 <bits/stdc++.h>
#include "grader.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
void solve(int n)
{
vector<int> xa(n);
for(int i = 0 ;i < n; i ++ ){
xa[i]=i+1;
}
random_shuffle(xa.begin(), xa.end());
int cur;
int Q = 0;
for(int i = 0 ; i < n; i ++ ){
if(Q <= 48){
cur = kth(xa[i]);
Q ++ ;
if(cnt(cur) > n/3){
say_answer(cur);
return;
}
}
}
say_answer(-1);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |