#include "grader.h"
#include <map>
using namespace std;
map < int , int > all;
void solve(int n)
{
int i,t;
for(i=1;i<=n;i++)
{
t=kth(i);
all[t]++;
if(all[t]>n/3)
{
say_answer(t);
return;
}
}
say_answer(-1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
82 ms |
536 KB |
Output is partially correct |
2 |
Partially correct |
45 ms |
256 KB |
Output is partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
824 ms |
2080 KB |
Output is partially correct |
2 |
Halted |
0 ms |
0 KB |
- |