Test for Job (poj 3249 记忆化搜索)】的更多相关文章

Language: Default Test for Job Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 9733   Accepted: 2245 Description Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's…
滑雪 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 88560   Accepted: 33212 Description Michael 喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你.Michael想知道载一个 区域中最长底滑坡.区域由一个二维数组给出.数组的每个数字代表点的高度.下面是一个例子 1 2 3 4 5 16 1…
(我是不会告诉你我是抄的http://www.cnblogs.com/scau20110726/archive/2013/02/27/2936050.html这个人的) 一开始没有想到要化一下方差的式子 怎么搞都挂-- 尴尬 /* 题目固定是8*8,本来想用点的坐标来表示矩形的,但是发现用标号来表示会方便一点 对于最小的小方格,用(i,j)表示,即第i行第j列的小方格,注意不是点的坐标 所以对于一个矩形,我们用它左上角的小方格和右下角的小方格来表示 例如,整个棋盘就是(1,1),(8,8) 另外…
滑雪 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 88094   Accepted: 33034 Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你.Michael想知道载一个区域中最长底滑坡.区域由一个二维数组给出.数组的每个数字代表点的高度.下面是一个例子 1 2 3 4 5 16 17…
题目传送门:http://poj.org/problem?id=2704 Pascal's Travels Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5535   Accepted: 2500 Description An n x n game board is populated with integers, one nonnegative integer per square. The goal is to tr…
题目传送门:http://poj.org/problem?id=1579 Function Run Fun Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20560   Accepted: 10325 Description We all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c): if a <=…
  A OpenJ_Bailian 1088 滑雪     B OpenJ_Bailian 1579 Function Run Fun     C HDU 1078 FatMouse and Cheese     D POJ 3280 Cheapest Palindrome     E OpenJ_Bailian 1976 A Mini Locomotive     F OpenJ_Bailian 2111 Millenium Leapcow     G OpenJ_Bailian 1141 B…
题目链接:http://poj.org/problem?id=3249 思路:dp[i]表示到点i的最大收益,初始化为-inf,然后从入度为0点开始bfs就可以了,一开始一直TLE,然后优化了好久才4000ms险过. 之后有写了个dfs记忆化搜索,果然快多了. bfs AC code: #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<q…
Test for Job Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 8990   Accepted: 2004 Description Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job…
滑雪 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 92384   Accepted: 34948 Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你.Michael想知道载一个区域中最长底滑坡.区域由一个二维数组给出.数组的每个数字代表点的高度.下面是一个例子 1 2 3 4 5 16 17…