题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2423题解:方案数比较麻烦。写在注释里吧, 1 #include 2 3 #include 4 5 #include 6 7 #include 8 9 #include ... Read More
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3653题解:稍微思考可以知道只要求x子树内dep[y]-dep[x] 2 3 #include 4 5 #include 6 7 #include 8 9 #include... Read More
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1048题解:搞清题意之后来个记忆化爆搜就行了。代码: 1 #include 2 3 #include 4 5 #include 6 7 #include 8 9 #include10 11... Read More