제출 #639102

#제출 시각아이디문제언어결과실행 시간메모리
639102LucaLucaMCONSUL (info1cup19_consul)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h."
#include <bits/stdc++.h>

using namespace std;

class Interactor
{
protected:
    vector<int>v = {-1};
    map<int, int>f;
public:
    void input (vector<int>a)
    {
        for (int x : a)
            v.push_back(x), f[x]++;
    }

    int kth (int i)
    {
        return v[i];
    }
    int cnt (int x)
    {
        return f[x];
    }
    void say_answer(int a)
    {
        cout << a;
    }
};

bitset<1001>vis;

int main()
{
    int n;
    cin >> n;

    int Q = 25 + 5*(n > 50);

    Q = min(Q, n);
    for (int query = 0; query<Q; query++)
    {
        int i;
        do
        {
            i = chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count();
            i = abs(i), i %= n, i++;
        }while (vis[i]);
        vis[i] = 1;

        i = kth(i);
        if (cnt(i) > n)
        {
            say_answer(i);
            return 0;
        }
    }

    say_answer(-1);

    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

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