测验(8.4)
qq_39479426
井底之蛙
展开
-
POJ2479
Description Given a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below: Your task is to calculate d(A). Input The input consists of T(<=30) test cases. The number of te...原创 2018-08-09 23:57:36 · 362 阅读 · 0 评论 -
CSU1980
小X非常喜欢树,然后他生成了一个大森林给自己玩。 玩着玩着,小X陷入了沉思。 一棵树由N个节点组成,编号为i的节点有一个价值Wi。 假设从树根出发前往第i个节点(可能是树根自己),一共需要经过Di个节点(包括起点和终点),那么这个节点对这棵树产生的负担就是Di与Wi的乘积。 对于一棵树而言,这棵树的负担值为所有节点对它产生的负担之和。 小X学习了dfs,如果他知道树的结构,他当然可以很容易地...原创 2018-08-10 00:02:47 · 94 阅读 · 0 评论 -
POJ1655
Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be the si...原创 2018-08-10 00:10:42 · 331 阅读 · 0 评论 -
POJ1019
A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer n...原创 2018-08-10 00:16:20 · 310 阅读 · 0 评论