Submission #315014

#TimeUsernameProblemLanguageResultExecution timeMemory
315014casperwangCONSUL (info1cup19_consul)C++14
85 / 100
37 ms384 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; const int MAXN = 1000; int v[MAXN+1]; void solve(int N) { srand(time(NULL)); for (int i = 1; i <= N; i++) v[i] = -1; for (int i = 1; i <= 30; i++) { int p = rand() % N + 1; while (v[p] != -1) p = rand() % N + 1; v[p] = kth(p); int c = cnt(v[p]); if (c * 3 > N) { say_answer(v[p]); return; } } say_answer(-1); return; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...