Submission #331993

#TimeUsernameProblemLanguageResultExecution timeMemory
331993jjjCONSUL (info1cup19_consul)C++14
100 / 100
69 ms364 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; void solve(int n) { int k; if(n > 50) k = 30; else k = 25; int m = 0, a = -1; mt19937 mt_rand(time(0)); while(k--) { int i = uniform_int_distribution <int> (1, n)(mt_rand); int e = kth(i), c = cnt(e); if(c > m) { m = c; a = e; } } if(m > n / 3) say_answer(a); else say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...