제출 #518687

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5186872022-01-24 12:26:44fleimgruber열쇠 (IOI21_keys)C++17
컴파일 에러
0 ms0 KiB
#include "algolib/union-find.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 300005;
int n;
vector<int> ans;
struct Edge {
int to, key; // key required
bool operator<(const Edge& o) const {
// cannot just use key, otherwise edges get lost (set)
return tie(key, to) < tie(o.key, o.to);
}
};
vector<int> out_can[MAX_N]; // only the to
set<Edge> out_blocked[MAX_N];
set<int> keys[MAX_N];
int par[MAX_N]; // parent in tree
UnionFind weakly(MAX_N); // weakly connected components
UnionFind<int> compressed(MAX_N);
// merge i into j, smaller to larger style
void merge(int i, int j) {
if (compressed.size(i) > compressed.size(j)) {
out_can[i].swap(out_can[j]);
out_blocked[i].swap(out_blocked[j]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

keys.cpp:1:10: fatal error: algolib/union-find.h: No such file or directory
    1 | #include "algolib/union-find.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.