摘要:
http://codeforces.com/gym/101128 题目大意:给你一个a,b,e,p。有e个点,p条有向边,每条边为(x,y),表示x->y,每次我们都取出一个入度为0的,并且一次性取出来的个数为a(或b)。当然,取出来的种类可能有很多种(即一个集合),问,这个集合中有多少个数字是相同 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5568 Given a tree with n vertices, we want to add an edge between vertex 1 and vertex x, so 阅读全文