ACM->DP
Fate_O
Lets go
展开
-
Codeforces 459E Pashmak and Graph
题目链接:http://codeforces.com/problemset/problem/459/A原创 2014-08-27 18:37:15 · 658 阅读 · 0 评论 -
hdu4529郑厂长系列故事——N骑士问题
#include #include #include #include #include #include #include using namespace std;const int ROW = 9;const int COL = 8;const int KNIGHT = 10 + 1; //其实上限const int STATE = (1 << 8);原创 2014-08-28 09:49:17 · 799 阅读 · 0 评论 -
hdu3555
/*题目大意:求1 - n范围内含有"49"的数的个数。思路:记忆化搜索*/#include #include #include #include #include #include using namespace std;const int NUMBER_LEN = 19;const int INDEX_LEN = 10;int cases, tot; //测原创 2014-08-06 12:41:07 · 952 阅读 · 0 评论 -
hdu1227 Fast Food
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1227#include #include #include #include #include #include using namespace std;const int MAXN = 200 + 1; //the number of restaurantsconst i原创 2014-08-04 18:43:35 · 607 阅读 · 0 评论 -
poj1185炮兵阵地
#include #include #include #include #include #include using namespace std;const int MAXN = 100 + 1; //阵地行数const int MAXM = 10 + 1; //阵地列数const int State_Num = 60 + 1; //阵地列状态原创 2014-08-05 09:50:05 · 729 阅读 · 0 评论 -
[Noi2005]聪聪和可可
[Noi2005]聪聪和可可Time Limit:10000MS Memory Limit:65536KTotal Submit:21 Accepted:14DescriptionInput数据的第1行为两个整数N和E,以空格分隔,分别表示森林中的景点数和连接相邻景点的路的条数。 第2行包含两个整数C和M,以空格分隔,分别表示初始时聪聪和可可所在的景点的编原创 2014-05-31 15:43:52 · 1666 阅读 · 0 评论 -
hdu3853 loops cf148D
简单概率期望类问题原创 2014-05-28 08:29:27 · 682 阅读 · 0 评论 -
动态规划
题意:求从左上角走到右下角所经过的路径上的数字z原创 2014-05-21 07:59:23 · 406 阅读 · 0 评论 -
hdu1003
#include #include #include #include using namespace std;#define oo (~0U >> 1)#define MAXN 100000 + 10int temp[MAXN];void input(){ int t, x, n, k = 0; cin >> t; while (t--)原创 2013-12-05 19:20:30 · 551 阅读 · 0 评论 -
DP->UVALive 4764
Bing itTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVALive 4764DescriptionI guess most of you played cards on the trip to Harbin, b原创 2013-10-12 18:29:06 · 995 阅读 · 1 评论 -
Common Subsequence
DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a原创 2013-09-21 18:15:40 · 458 阅读 · 0 评论 -
数塔
Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1原创 2013-09-21 18:15:23 · 561 阅读 · 0 评论 -
URAL 1741 Communication Fiend
链接:http://acm.timus.ru/problem.aspx?space=1&num=1741题意:kolya需要升级icq版本,从1版本升级到n版本,网上有些m个升级包,可以从版本sm升级到em版本,这些升级包大小不一,有些是正版Licensed,有些是盗版Pirated,有些是破解版Cracked,正版升级包只能升级正版软件。盗版升级包可以升级盗版软件转载 2013-09-20 19:30:12 · 687 阅读 · 0 评论 -
hdu 4714 Tree2cycle
Tree2cycleTime Limit: 15000/8000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 792 Accepted Submission(s): 182Problem DescriptionA tree with N no原创 2013-09-09 19:27:04 · 566 阅读 · 0 评论 -
小明的迷宫
Accept: 65 Submit: 196Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description小明误入迷宫,塞翁失马焉知非福,原来在迷宫中还藏着一些财宝,小明想获得所有的财宝并离开迷宫。因为小明还是学生,还有家庭作业要做,所以他想尽快获得所有财宝并离开迷宫。 Input原创 2015-04-27 10:37:34 · 955 阅读 · 0 评论