#include "airline.h"
#include <iostream>
#include <vector>
#include <set>
#include <tuple>
#include <cassert>
#include <algorithm>
using namespace std;
#define f first
#define s second
void Alice(int N, int M, int A[], int B[]) {
vector<int> deg(1e6, 0);
vector<pair<int, int>> edges;
for (int i = 0; i < M; i++) {
edges.push_back({A[i], B[i]});
deg[A[i]]++;
deg[B[i]]++;
}
int mx = 0;
for (int i = N - 1; i >= 0; i--) {
mx = max(mx, deg[i] + i + 1);
}
int nd = N;
for (int i = 0; i < N; i++) {
while (deg[i] < mx) {
edges.push_back({i, nd++});
deg[i]++;
deg[nd]++;
}
mx--;
}
InitG(nd, edges.size());
for (int i = 0; i < edges.size(); i++) {
MakeG(i, edges[i].f, edges[i].s);
}
return;
}
#include "airline.h"
#include <iostream>
#include <vector>
#include <set>
#include <tuple>
#include <cassert>
#include <algorithm>
using namespace std;
#define f first
#define s second
void Bob(int V, int U, int C[], int D[]) {
vector<int> deg(V, 0);
for (int i = 0; i < U; i++) {
deg[C[i]]++;
deg[D[i]]++;
}
vector<pair<int, int>> nds;
for (int i = 0; i < V; i++) {
nds.push_back({deg[i], i});
}
sort(nds.begin(), nds.end(), greater<pair<int, int>>());
vector<int> mp(V, 0);
for (int i = 0; i < V; i++) {
mp[nds[i].s] = i;
}
vector<pair<int, int>> edges;
set<int> s;
for (int i = 0; i < U; i++) {
if (deg[C[i]] == 1 || deg[D[i]] == 1) continue;
edges.push_back({mp[C[i]], mp[D[i]]});
s.insert(mp[C[i]]);
s.insert(mp[D[i]]);
}
InitMap(s.size(), edges.size());
for (int i = 0; i < edges.size(); i++) {
MakeMap(edges[i].f, edges[i].s);
}
return;
}
Compilation message
Alice.cpp:1:10: fatal error: airline.h: No such file or directory
1 | #include "airline.h"
| ^~~~~~~~~~~
compilation terminated.
Bob.cpp:1:10: fatal error: airline.h: No such file or directory
1 | #include "airline.h"
| ^~~~~~~~~~~
compilation terminated.