#include "grader.h"
#include <map>
using namespace std;
map<int, int>mp;
void solve(int n)
{
int i;
int l = 60;
if (n <= 50)
l = 50;
for (i = 1; i <= l;)
{
int k = kth(i);
i++;
if (mp[k] == 0)
{
mp[k] = cnt(k);
i++;
}
if (mp[k] > n / 3)
{
say_answer(k);
return;
}
}
say_answer(-1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Wrong query format |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
10 ms |
336 KB |
Output is partially correct |
2 |
Incorrect |
6 ms |
208 KB |
Wrong answer |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
288 KB |
Output is correct |
2 |
Correct |
19 ms |
292 KB |
Output is correct |
3 |
Incorrect |
1 ms |
208 KB |
Wrong answer |
4 |
Halted |
0 ms |
0 KB |
- |