#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve(int N)
{
mt19937 mt(time(nullptr));
int limit=60;
if(N<=50)
limit=50;
limit/=2;
while(limit--)
{
int gdzie=mt()%N+1;
int ile=kth(gdzie);
if(cnt(ile)>N/2)
{
say_answer(ile);
return;
}
}
say_answer(-1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |