Submission #1145874

#TimeUsernameProblemLanguageResultExecution timeMemory
1145874idonoamCONSUL (info1cup19_consul)C++20
19 / 100
211 ms420 KiB
#include <bits/stdc++.h> #include <cctype> #include "grader.h" using namespace std; void solve(int n) { vector<int> vec(n); for(int i = 0; i < n;i++){ vec[i] = kth(i+1); } sort(vec.begin(), vec.end()); long long ls = vec[0], cou = 1; bool cont = true; for(int i = 1; i < n && cont; i++){ if(ls == vec[i]){ if(++cou > n/3){ say_answer(ls); cont = false; } } else{ ls = vec[i]; cou = 1; } } if(cont){say_answer(-1);} }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...