HDU
文章平均质量分 82
zwsign
这个作者很懒,什么都没留下…
展开
-
HDU 5631 Rikka with Graph
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph with n vertices and n+1 ed原创 2016-03-27 13:53:28 · 251 阅读 · 0 评论 -
HDU 5364 Distribution money
Problem Description AFA want to distribution her money to somebody.She divide her money into n same parts.One who want to get the money can get more than one part.But if one man's money is more than原创 2016-03-27 13:30:07 · 404 阅读 · 0 评论 -
HDU 4489 The King’s Ups and Downs
原题地址 题意 给定N个小人,小人身高各不相同,现在N个小人站成一排,要求任意连续的3个小人的身高成“高低高”或者“低高低”,问可能的排列数目。 题解 首先,dp[n]是N个人的合法排列数,那么dp[n+1]应该怎么抽象呢? 为了使决策有序,假设前N个人身高1-N,那么第N+1个人身高就是N+1. 为什么可以这样假设呢,因为dp[N+1]应该是一个只和N有关的数,那么插原创 2016-05-03 00:24:17 · 284 阅读 · 0 评论 -
HDU 4055 Number String
原题地址 题意 给定一个字符序列,要求求对应地合法数字序列的排列数目,满足对应位置的数字的大小关系和字符序列匹配 II 对应 1 2 3 ID 对应 1 3 2 或者 2 3 1 I 表示递增,D表示递减,?表示随意。 题解 dp[i]是长度为i的排列数,那么考虑大小关系,显然状态转移需要第i-1位的数的值 dp[i][j]表示长度为i,末尾数字为j原创 2016-05-03 00:51:03 · 279 阅读 · 1 评论