#include "grader.h"
#define wiwihorz
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i <= b; i ++)
using namespace std;
void solve(int n) {
set<int> s;
rep(i, 1, 25) {
int k;
while(k = rand() % n + 1, s.find(k) != s.end());
s.insert(k);
k = kth(k);
if(cnt(k) > n / 3) {
say_answer(k);
return;
}
}
say_answer(-1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
27 ms |
200 KB |
Output is correct |
2 |
Correct |
9 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
200 KB |
Output is correct |
2 |
Correct |
19 ms |
200 KB |
Output is correct |
3 |
Correct |
4 ms |
200 KB |
Output is correct |
4 |
Correct |
7 ms |
200 KB |
Output is correct |
5 |
Correct |
25 ms |
200 KB |
Output is correct |
6 |
Correct |
21 ms |
200 KB |
Output is correct |
7 |
Correct |
26 ms |
200 KB |
Output is correct |
8 |
Correct |
22 ms |
200 KB |
Output is correct |
9 |
Correct |
18 ms |
232 KB |
Output is correct |
10 |
Correct |
29 ms |
200 KB |
Output is correct |
11 |
Correct |
19 ms |
200 KB |
Output is correct |
12 |
Correct |
25 ms |
200 KB |
Output is correct |
13 |
Correct |
27 ms |
200 KB |
Output is correct |
14 |
Correct |
25 ms |
200 KB |
Output is correct |