Problem - E - Codeforces
题意: 思路:
样例: 这种分类讨论的题,主要是去看答案的最终来源是哪几种情况,这几种情况得不重不漏 Code:
#include <bits/stdc.h>#define int long longusing i64 lon…
Copil Copac is given a list of n − 1 n-1 n−1 edges describing a tree of n n n vertices. He decides to draw it using the following algorithm:
Step 0 0 0: Draws the first vertex (vertex 1 1 1). Go to step 1 1 1.Step 1 1 1: For every edge in the inpu…