답안 #314557

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
314557 2020-10-20T10:06:10 Z balbit CONSUL (info1cup19_consul) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
#ifndef BALBIT
#include "consul.h"
#endif

#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)(x.size())

#ifdef BALBIT
#define bug(...) cerr<<"#"<<__LINE__<<": "<<#__VA_ARGS__<<"- ", _do(__VA_ARGS__)
template<typename T> void _do(T && x){cerr<<x<<endl;}
template<typename T, typename ...S> void _do(T && x, S && ...y){cerr<<x<<", "; _do(y...);}
#else
#define bug(...)
#endif

#ifdef BALBIT

#endif // BALBIT

mt19937 rng (chrono::steady_clock::now().time_since_epoch().count());

void solve(int n) {

    map<int, int> mp;
    vector<int> p(n);
    for (int i = 0; i<n; ++i) p[i] = i;
    shuffle(ALL(p), rng);
    int qleft = 60;
    for (int i = 0; i<n && SZ(mp)+1 < qleft-1; ++i) {
        mp[kth(p[i]+1)]++;
    }
    for (pii & p : mp) {
        int cc = cnt(p.f+1);
        if (cc * 3 > n) {
            say_answer(p.f+1);
            return;
        }
    }
    assert(0);
}


#ifdef BALBIT
signed main(){
    bug(1,2);

}

#endif // BALBIT

Compilation message

consul.cpp:4:10: fatal error: consul.h: No such file or directory
    4 | #include "consul.h"
      |          ^~~~~~~~~~
compilation terminated.