Submission #724162

#TimeUsernameProblemLanguageResultExecution timeMemory
724162stevancvCONSUL (info1cup19_consul)C++14
100 / 100
31 ms296 KiB
#include <bits/stdc++.h> #include "grader.h" #define ll long long #define ld long double #define sp ' ' #define en '\n' #define smin(a, b) a = min(a, b) #define smax(a, b) a = max(a, b) using namespace std; const int N = 1e3 + 2; const int inf = 1e9; void solve(int n) { int l = 60; if (n <= 50) l = 50; l /= 2; mt19937 mt(time(nullptr)); while(l--) { int i = (mt() % n) + 1; int j = kth(i); if (cnt(j) > n / 3) { say_answer(j); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...