Codeforces Round #422 (Div. 2), problem: (F) Madness Solution In C/C++

By |2017-07-25T09:06:25+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<cstdio> #include<cstdlib> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<stack> #include<queue> #include<map> #include<cmath> using namespace std; #define pi acos(-1.0) typedef long long ll; typedef double db; const int MAXN = 105; vector<pair<int, int> >e[MAXN]; int fa[MAXN], id[MAXN]; db t[MAXN]; void dfs(int u){ db now=t[u], add=2.0/e[u].size(); for(int [...]