제출 #1315355

#제출 시각아이디문제언어결과실행 시간메모리
1315355ghammazhassanCONSUL (info1cup19_consul)C++20
0 / 100
3 ms332 KiB
// #include <bits/stdc++.h>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <vector>
#include <iomanip>
#include <string>
#include <queue>
#include <set>
#include <deque>
#include "grader.h"

using namespace std;

static const int MIN_VALUE = 0, MAX_VALUE = (1e9) - 1;

static map<int,int> mp;
static int Q, N, a[5005];
static bool issol, answer;

void solve(int N);

void solve(int n){
    vector<int>a(n);
    for (int i=0;i<n;i++){
        a[i]=i+1;
    }
    while (true){
        int x=(rand())%(a.size());
        cerr << a[x] << endl;
        int y=kth(a[x]);
        if (cnt(y)>n/3){
            say_answer(y);
            cerr << endl;
            return;
        }
        a.erase(a.begin()+x);
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...