제출 #861247

#제출 시각아이디문제언어결과실행 시간메모리
861247Ahmed57CONSUL (info1cup19_consul)C++17
0 / 100
1 ms344 KiB
#include <bits/stdc++.h>

using namespace std;
int kth(int i);
int cnt(int x);
void say_answer(int a);
void solve(int N){
    srand(time(0));
    for(int i = 1;i<=min(N,50);i++){
        int w = kth(rand()%N+1);
        int x = cnt(w);
        if(x>N/3){
            say_answer(w);
            break;
        }
    }
    say_answer(-1);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...