#include <bits/stdc++.h>
using namespace std;
vector<vector<bool>> a;
vector<vector<int>> c;
void initialize(int n){
a.resize(n);
c.resize(n);
for(auto& i : a) i.resize(n, false);
}
int hasEdge(int u, int v){
a[u][v] = a[v][u] = true;
if(c[u].size() == c[v].size() && find(c[u].begin(), c[u].end(), v) != c[u].end()) return 1;
auto uc = c[u], vc = c[v];
uc.push_back(u);
vc.push_back(v);
for(int i : uc) for(int j : vc) {
if(!a[i][j]) return 0;
}
for(int i : uc){
for(int j : vc){
c[j].push_back(i);
c[i].push_back(j);
}
}
return 1;
}
// int main(){
// int n, u,v;
// cin >> n;
// initialize(n);
// for(int i = 0;i < n * (n-1) / 2;i++){
// cin >> u >> v;
// cout << hasEdge(u, v) << '\n';
// }
// }
Compilation message
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status