Skip to content

Instantly share code, notes, and snippets.

@Hacv16
Hacv16 / copa.cpp
Created July 27, 2023 20:27
Copa do Mundo OBI 2014
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 115;
int n, f, r;
vector<tuple<int, int, int, int>> arestas; // tipo, peso, vertice 1, vertice 2
int pai[MAXN], sze[MAXN]; // vetores do Union-Find
int find(int u)