ACM_动态规划
文章平均质量分 82
隐形的稻草人哦
这个作者很懒,什么都没留下…
展开
-
hdu 5781 ATM...(概率&&DP)
hdu 5781 传送门题意已知账户里最多有n元,有一个取款下限,高于可以将钱取走,低于的话会被警告一次。警告次数超过m次时,将会被当做小偷。。。 n,m≤2×1e3.题解比赛时,没有意识到是一道DP题,一直在二分的角度想题。还是题目理解的不够深刻。下面给个数学期望的定义吧。 数学期望(mean)(或均值,亦简称期望)是试验中每次可能结果的概率乘以其结果的总和。–出自百度百科 看了很多的博文,转载 2016-08-06 12:57:50 · 259 阅读 · 0 评论 -
POJ 2393 Yogurt Factory(贪心 ?? dp)
Yogurt factory Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9380 Accepted: 4768 Description The cows have purchased a yogurt factory that makes world-famous Yucky Yo原创 2016-08-19 15:31:56 · 302 阅读 · 0 评论 -
Uva 10003 切木棍(dp)
You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery,Inc. (ACM), charges money according to the length of the stick being cut. Their procedure of workrequ原创 2016-08-10 14:12:43 · 1693 阅读 · 0 评论 -
cf 706C Hard Problem(dp)
> C. Hard problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy is fond of solving different tasks.原创 2016-08-24 21:51:04 · 317 阅读 · 0 评论 -
UVA 几道dp题总结
先给一个Virtual Judge 上挂的地址 dpA - A Spy in the Metro题意起点站和终点站之间有若干个站点,同时,在起点站和终点站会在若干的固定时间始出列车。某人将从起点站出发,在t时到终点站见人,但是希望在站点等尽量少的时间。求出最少的等待时间。分析dp。。 “时间 是 一个天然的序”,所以,影响决策的只有时间和当前的站点。 dp[i][j] 表示 在 第i时间原创 2016-08-24 11:26:28 · 310 阅读 · 0 评论 -
POJ Cow Bowling(dp)
Description The cows don’t use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling-pin-like triangle like this: 7原创 2016-08-26 17:06:31 · 540 阅读 · 0 评论 -
POJ 2229 Sumsets(计数dp)
Description Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer power of 2. Here are the possible sets of原创 2016-08-26 17:18:03 · 466 阅读 · 0 评论 -
UVA 10827(环面部分数组和最大值)
思路1,枚举每个开始的左上角的坐标,然后枚举矩形的长和宽,用数组来记录每一列的前n行和,这个数组可以是二维的,也可以是一维,用滚动来实现。用sum[i]来记录前n列和,更新ans,即可。 2,枚举矩形的上下界限,将二维数组降为一维数组的连续子序列的最大值。dp一下就可以了。思路一代码#include <bits/stdc++.h>using namespace std; int a[160][16原创 2016-11-05 10:33:39 · 409 阅读 · 0 评论