제출 #1352688

#제출 시각아이디문제언어결과실행 시간메모리
1352688vahagngEvent Hopping (BOI22_events)C++20
컴파일 에러
0 ms0 KiB
#include "art.h"
#include <bits/stdc++.h>
using namespace std;

const int NN = 4001;

int match[NN];

void divide_and_conquer(int i, int N) {
    if (i == N) return;
    vector<int>cur, v;
    int itr = i;
    v.push_back(i);
    for (int j = 1; j <= N; j++) {
        if (match[j] == -1){
            if(i == itr){
                itr++;
                continue;
            }
            v.push_back(itr++);
        }
        else v.push_back(match[j]);
    }
    cur = v;
    int R1 = publish(cur);
    vector<int>RR;
    for(int j = 1; j < N; j++) RR.push_back(cur[j]);
    RR.push_back(i);
    cur = RR;
    int R2 = publish(cur);
    cerr << R1 << ' ' << R2 << endl;
    match[((N - 1) + (R1 - R2)) / 2 + 1] = i;
    cerr << i << ' ' << ((N - 1) + (R1 - R2)) / 2 + 1 << endl;
    divide_and_conquer(i + 1, N);
}

void solve(int N) {
    vector<int> ord(N);
    iota(ord.begin(), ord.end(), 1);
    for (int i = 1; i <= N; i++) match[i] = -1;
    divide_and_conquer(1, N);
    vector<int> res;
    for (int i = 1; i <= N; i++){
        if(match[i] == -1) match[i] = N;
        res.push_back(match[i]);
    }
    answer(res);
}

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

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