Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ add_edge
Method
add_edge
code/graph/arborescence.cpp:6–7 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4
vector<vector<pair<ii,int> > > adj;
5
arborescence(int _n) : n(_n), uf(n), adj(n) { }
6
void add_edge(int a, int b, int c) {
7
adj[b].push_back(make_pair(ii(a,b),c)); }
8
vii find_min(int r) {
9
vi vis(n,-1), mn(n,INF); vii par(n);
10
rep(i,0,n) {
Callers
nothing calls this directly
Calls
1
push_back
Method · 0.80
Tested by
no test coverage detected