제출 #1100738

#제출 시각아이디문제언어결과실행 시간메모리
1100738Kirill22CONSUL (info1cup19_consul)C++17
100 / 100
21 ms508 KiB
#include "bits/stdc++.h" using namespace std; int kth(int x); int cnt(int x); void say_answer(int x); mt19937 gen(22); int n; void solve(int N) { n = N; int limit = n <= 50 ? 50 : 60; for (int i = 0; i < limit; i += 2) { int pos = gen() % n + 1; int x = kth(pos); if (cnt(x) > n / 3) { say_answer(x); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...