# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
498943 | 2021-12-26T19:37:32 Z | cadmiumsky | CONSUL (info1cup19_consul) | C++14 | 0 ms | 0 KB |
#include <random> #include <chrono> using namespace std; mt19937 rng(time(0)); void solve(int N) { for(int i=0; i<30; i++) { int index=(rng()%N)+1; int val=kth(index); int freq=cnt(val); if(freq > N/3) { say_answer(val); return; } } say_answer(-1); }