摘要:
该题目的意思是,给定一棵树,每个点有个权值,目标是选择某些点使总权值和最大,但是要求任意一对父节点和子节点不能一起选择。 思路:DP。说的高大尚一点就是树形DP。 从子节点往根节点走,DP[ i ][ 0 ]表示以i为顶点的子树,不选 i 点的情况下最大值。DP[ i ][ 1 ]表示以 i 为顶点 阅读全文
摘要:
题目描述:链接点此 这套题的github地址(里面包含了数据,题解,现场排名):点此 链接:https://www.nowcoder.com/acm/contest/104/H来源:牛客网 题目描述 Mingming, a cute girl of ACM/ICPC team of Wuhan Un 阅读全文
摘要:
题目链接:点此 我的github地址:点此 Problem Description Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 阅读全文
摘要:
题目描述:链接点此 这套题的github地址(里面包含了数据,题解,现场排名):点此 题目描述 由于系统限制,C题无法在此评测,此题为现场赛的D题 Who killed Cock Robin? I, said the Sparrow, With my bow and arrow,I killed C 阅读全文
摘要:
题目描述:链接点此 这套题的github地址(里面包含了数据,题解,现场排名):点此 题目描述 Given n positive integers , your task is to calculate the product of these integers, The answer is les 阅读全文