# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100737 | 2024-10-14T14:38:52 Z | Kirill22 | CONSUL (info1cup19_consul) | C++17 | 0 ms | 0 KB |
#include "bits/stdc++.h" using namespace std; mt19937 gen(22); int n; void solve(int N) { n = N; int limit = n <= 50 ? 50 : 60; for (int i = 0; i < limit; i += 2) { int pos = gen() % n + 1; int x = kth(pos); if (cnt(x) > n / 3) { say_answer(x); return; } } say_answer(-1); }