제출 #1234646

#제출 시각아이디문제언어결과실행 시간메모리
1234646khomeCONSUL (info1cup19_consul)C++20
0 / 100
1 ms416 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; set<int> st; int get_new(int n){ srand((int)time(0)); int i = rand()%n; while (st.find(i) != st.end()) i = rand()%n; st.insert(i); return i; } void solve(int n) { map<int, int> mp; int all = 0; while (true) { int k = kth(get_new(n)); int k_cnt = cnt(k); all += k_cnt; mp[k] = k_cnt; if (mp[k] > n/3) { say_answer(k); return; } if (all >= n) { say_answer(-1); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...