Submission #523149

#TimeUsernameProblemLanguageResultExecution timeMemory
523149reniCONSUL (info1cup19_consul)C++17
13.03 / 100
35 ms200 KiB
#include "grader.h" #include<unordered_map> #include <stdlib.h> #include<time.h> #include<iostream> using namespace std; void solve(int n) { unordered_map<long long, int>mp; srand (time(0)); for(int i=1;i<=min(n,60);i++) { long long pos=rand()%n+1; long long val=kth(pos); if(mp.count(val))continue; mp[val]=1; if(cnt(val) > n / 3){say_answer(val);return;} } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...