Submission #667107

#TimeUsernameProblemLanguageResultExecution timeMemory
667107divadCONSUL (info1cup19_consul)C++14
100 / 100
23 ms208 KiB
#include "grader.h" #include <iostream> #include <map> using namespace std; map<int, int> m; void solve(int n){ m.clear(); int salt = max(2, 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{ if(nrq < 60){ m[val] = cnt(val); nrq++; if(m[val] > n/3){ say_answer(val); return ; } } } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...