Codeforces Round #392 (Div. 2), problem: (E) Broken Tree Solution in C/C++
#include <bits/stdc++.h> #define mk make_pair using namespace std; typedef long long ll; const int N=1e6+5; struct edge { int x,y,w,p; edge(){} void input() { scanf(“%d%d%d%d”,&x,&y,&w,&p); } }E,EE; int n; vector<int> G; ll W,WW; void dfs(int …