Live2d Test Env
摘要: Alice are given an array A[1..N]A[1..N] with NN numbers. Now Alice want to build an array BB by a parameter KK as following rules: Initially, the arra 阅读全文
posted @ 2018-09-24 22:01 nimphy 阅读(502) 评论(0) 推荐(1) 编辑
摘要: Bob intends to color the nodes of a tree with a pen. The tree consists of NN nodes. These nodes are numbered 1,2,...,N1,2,...,N. The root of the tree 阅读全文
posted @ 2018-09-24 21:50 nimphy 阅读(590) 评论(0) 推荐(0) 编辑
摘要: Alice is interesting in computation geometry problem recently. She found a interesting problem and solved it easily. Now she will give this problem to 阅读全文
posted @ 2018-09-24 21:45 nimphy 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 题意:T组样例,给次给出一个N节点的点权树,以及M,问连通块的点权和sum的情况,输出sum=1到M,用0或者1表示。 思路:背包,N^2,由于是无向的连通块,所以可以用分治优化到NlgN。 然后背包可以用bitset优化。注意不要想着背包合并背包,背包只能合并单点。 阅读全文
posted @ 2018-09-24 09:18 nimphy 阅读(788) 评论(0) 推荐(0) 编辑