
ZOJ
吃灰狼的小红帽
放飞理想的有志青年。
展开
-
Prime Set ZOJ - 3988
Given an array of integers , we say a set is a prime set of the given array, if and is prime. BaoBao has just found an array of integers in his pocket. He would like to select at most原创 2017-11-15 13:23:39 · 398 阅读 · 0 评论 -
Edge to the Root ZOJ - 3949 (树形DP)
Given a tree with n vertices, we want to add an edge between vertex 1 and vertex x, so that the sum of d(1, v) for all vertices v in the tree is minimized, where d(u, v) is the minimum number of edges...原创 2018-04-10 19:57:28 · 247 阅读 · 0 评论