#include <bits/stdc++.h>
//#include "grader.h"
using namespace std;
int kth(int i);
int cnt(int x);
void say_answer(int a);
void solve(int n)
{
srand(435623);
rand(), rand(), rand();
for(int i = 1; i <= 50; i++)
{
int poz = (int)(rand() % n) + 1;
int val = kth(poz);
int nr = cnt(val);
if(nr * 3 > n)
{
say_answer(val);
return;
}
}
say_answer(-1);
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
208 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
30 ms |
208 KB |
Output is partially correct |
2 |
Correct |
7 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
29 ms |
292 KB |
Output is partially correct |
2 |
Partially correct |
40 ms |
208 KB |
Output is partially correct |
3 |
Correct |
7 ms |
208 KB |
Output is correct |
4 |
Correct |
6 ms |
208 KB |
Output is correct |
5 |
Partially correct |
27 ms |
208 KB |
Output is partially correct |
6 |
Partially correct |
31 ms |
208 KB |
Output is partially correct |
7 |
Partially correct |
29 ms |
208 KB |
Output is partially correct |
8 |
Partially correct |
34 ms |
208 KB |
Output is partially correct |
9 |
Partially correct |
31 ms |
208 KB |
Output is partially correct |
10 |
Partially correct |
16 ms |
300 KB |
Output is partially correct |
11 |
Partially correct |
39 ms |
208 KB |
Output is partially correct |
12 |
Partially correct |
27 ms |
208 KB |
Output is partially correct |
13 |
Partially correct |
24 ms |
292 KB |
Output is partially correct |
14 |
Partially correct |
35 ms |
208 KB |
Output is partially correct |