#include <bits/stdc++.h>
#include <grader.h>
using namespace std;
void solve(int n) {
srand(time(NULL));
map<int, int> mp;
for (int i = 1; i <= 60; i++) {
int x = rand() % n + 1;
if (mp.find(x) != mp.end()) {
continue;
}
mp[x] = true;
x = kth(x);
if (cnt(x) > n / 3) {
say_answer(x);
return;
}
}
say_answer(-1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
208 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
24 ms |
208 KB |
Output is partially correct |
2 |
Correct |
6 ms |
208 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
32 ms |
208 KB |
Output is partially correct |
2 |
Partially correct |
41 ms |
300 KB |
Output is partially correct |
3 |
Correct |
9 ms |
296 KB |
Output is correct |
4 |
Correct |
7 ms |
208 KB |
Output is correct |
5 |
Partially correct |
36 ms |
208 KB |
Output is partially correct |
6 |
Partially correct |
33 ms |
208 KB |
Output is partially correct |
7 |
Partially correct |
42 ms |
208 KB |
Output is partially correct |
8 |
Partially correct |
49 ms |
208 KB |
Output is partially correct |
9 |
Partially correct |
38 ms |
208 KB |
Output is partially correct |
10 |
Partially correct |
38 ms |
208 KB |
Output is partially correct |
11 |
Partially correct |
45 ms |
208 KB |
Output is partially correct |
12 |
Partially correct |
33 ms |
208 KB |
Output is partially correct |
13 |
Partially correct |
52 ms |
292 KB |
Output is partially correct |
14 |
Partially correct |
42 ms |
208 KB |
Output is partially correct |