제출 #369384

#제출 시각아이디문제언어결과실행 시간메모리
369384dooweyCONSUL (info1cup19_consul)C++14
100 / 100
36 ms492 KiB
#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define fi first
#define se second
#define mp make_pair


void solve(int n)
{
    vector<int> xa(n);
    for(int i = 0 ;i < n; i ++ ){
        xa[i]=i+1;
    }
    random_shuffle(xa.begin(), xa.end());
    int cur;
    int Q = 0;
    for(int i = 0 ; i < n; i ++ ){
        if(Q <= 48){
            cur = kth(xa[i]);
            if(cnt(cur) > n/3){
                say_answer(cur);
                return;
            }
            Q += 2;
        }

    }
    say_answer(-1);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...