Submission #360234

#TimeUsernameProblemLanguageResultExecution timeMemory
360234ogibogi2004CONSUL (info1cup19_consul)C++14
100 / 100
36 ms364 KiB
#include "grader.h" #include<bits/stdc++.h> using namespace std; void solve(int n) { /// insert your code /// for example set<int>checked; srand(23543); int cnt1=0; for(;cnt1+2<=min(n,60);) { int i=rand()%n+1; if(checked.find(i)!=checked.end())continue; checked.insert(i); cnt1+=2; int val=kth(i); if(cnt(val)*3>n) { say_answer(val); return; } } say_answer(-1); return; if(cnt(kth(1)) > n / 3) say_answer(kth(1)); else say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...