![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp专题
dp专题
水墨青杉
这个作者很懒,什么都没留下…
展开
-
dp专题 51Nod - 1588
题目 比得喜欢幸运数字。这里所说的幸运数字是由4和7组成的正整数。比如,数字47,744,4是幸运数字,而5,17,467就不是。 一天,比得遇到一棵由n个点组成的树。另外,这棵树是带权的,即每条边有一个权值(由一个正整数表示)。如果一条边的权值是一个幸运数字,那么我们就说这条边是一条幸运边。说明一下,一棵n个结点的树是由n个结点和n-1条边组的无环的无向图。 比得好奇,在树中有多少个满足以下条件...原创 2020-01-15 19:26:37 · 147 阅读 · 0 评论 -
dp专题 POJ - 2411
题目 有个nm的矩形,有12和21这两种矩形,问用这两种矩形将nm的矩形填满有多少种方案。(1<=n,m<=11) 解题思路 (1<=n,m<=11)可以进行状态压缩。 问题是这两种矩形如何在状态里如何表示。 考虑到21的矩形会影响第i-1行与第i行的状态,如果第i-1行第j位要放一个21的矩形,那么第i行第j位会被占用。 因此要放21的矩形占用了第i-1行第j位以及第i行...原创 2020-01-15 18:32:02 · 95 阅读 · 0 评论 -
dp专题 HYSBZ - 1087
题目 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上 左下右上右下八个方向上附近的各一个格子,共8个格子。 Input 只有一行,包含两个数N,K ( 1 <=N <=9, 0 <= K <= N * N) Output 方案数。 Sample Input 3 2 Sample Output 16 解题思路 由于(...原创 2020-01-15 18:10:12 · 147 阅读 · 0 评论 -
dp专题 LightOJ - 1248
题目 Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the ...原创 2020-01-15 17:33:07 · 108 阅读 · 0 评论 -
dp专题 CodeForces - 407B
题目 One day, little Vasya found himself in a maze consisting of (n + 1) rooms, numbered from 1 to (n + 1). Initially, Vasya is at the first room and to get out of the maze, he needs to get to the (n + ...原创 2020-01-15 11:42:34 · 171 阅读 · 0 评论 -
dp专题 HDU-1114
题目 Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is sim...原创 2020-01-15 11:20:24 · 102 阅读 · 0 评论 -
dp专题 HDU - 1257
题目 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截...原创 2020-01-14 21:55:05 · 145 阅读 · 0 评论 -
dp专题 POJ-1742
题目 People in Silverland use coins.They have coins of value A1,A2,A3…An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a near...原创 2020-01-14 20:36:03 · 171 阅读 · 0 评论 -
dp专题 UVA-624
题目 You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N minutes long. H...原创 2020-01-14 19:43:10 · 187 阅读 · 0 评论