This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include <iostream>
#include <map>
using namespace std;
map<int, int> m;
void solve(int n){
m.clear();
int salt = max(1, n/60);
int nrq = 0;
for(int i = 1; i <= n && nrq <= 60; i += salt){
int val = kth(i); nrq++;
if(m.count(val)){
}else{
m[val] = cnt(val); nrq++;
if(m[val] > n/3){
say_answer(val);
return ;
}
}
}
say_answer(-1);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |