Submission #639108

#TimeUsernameProblemLanguageResultExecution timeMemory
639108LucaLucaMCONSUL (info1cup19_consul)C++17
100 / 100
29 ms208 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; void solve(int n) { int Q = 25 + 5*(n > 50); Q = min(Q, n); for (int query = 0; query<Q; query++) { int i; i = chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count(); i = abs(i), i %= n, i++; i = kth(i); if (cnt(i) > n/3) { say_answer(i); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...