#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int n)
{
/// insert your code
/// for example
set<int>checked;
srand(23543);
int cnt1=0;
for(;cnt1+2<=60;)
{
int i=rand()%n+1;
if(checked.find(i)!=checked.end())continue;
checked.insert(i);
cnt1+=2;
int val=kth(i);
if(cnt(val)*3>n)
{
say_answer(val);
}
}
say_answer(-1);
if(cnt(kth(1)) > n / 3) say_answer(kth(1));
else say_answer(-1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Multiple answers provided for the same testcase! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Multiple answers provided for the same testcase! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Multiple answers provided for the same testcase! |
2 |
Halted |
0 ms |
0 KB |
- |