Help Jimmy Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 14214   Accepted: 4729 Description "Help Jimmy" 是在下图所示的场景上完成的游戏. 场景中包括多个长度和高度各不相同的平台.地面是最低的平台,高度为零,长度无限. Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒.当Jimmy落到某个平台上时,游戏者选择让它向左还是向右…
Tickets Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8077    Accepted Submission(s): 4101 Problem Description Jesus, what a great movie! Thousands of people are rushing to the cinema. However…
Treats for the Cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7949   Accepted: 4217 Description FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per da…
免费馅饼 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 64198    Accepted Submission(s): 22545 Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼.说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的1…
FatMouse and Cheese Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14253    Accepted Submission(s): 6035 Problem Description FatMouse has stored some cheese in a city. The city can be considere…
Doing Homework Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12174    Accepted Submission(s): 5868 Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a l…
Monkey and Banana Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20094    Accepted Submission(s): 10725 Problem Description A group of researchers are designing an experiment to test the IQ of…
Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32767 K (Java/Others)Total Submission(s): 43629    Accepted Submission(s): 19213 Problem Description "OK, you are not too bad, em... But you can never pass the…
Piggy-Bank Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 35043    Accepted Submission(s): 17420 Problem Description Before ACM can do anything, a budget must be prepared and the necessary fina…
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 50078    Accepted Submission(s): 23221 Problem Description Nowadays, a kind of chess game called “Super Jumping!…
layout: post title: 「kuangbin带你飞」专题十二 基础DP author: "luowentaoaa" catalog: true tags: mathjax: true - kuangbin - 动态规划 传送门 A.HDU1024 Max Sum Plus Plus 题意 给你N个数,然后你分成M个不重叠部分,并且这M个不重叠部分的和最大. 思路 动态规划最大m字段和,dp数组,dp[i][j]表示以a[j]结尾的,i个字段的最大和 两种情况:1.第a[j…
        ID Origin Title   167 / 465 Problem A HDU 1024 Max Sum Plus Plus   234 / 372 Problem B HDU 1029 Ignatius and the Princess IV   161 / 259 Problem C HDU 1069 Monkey and Banana   104 / 188 Problem D HDU 1074 Doing Homework   153 / 248 Problem E…
A - Max Sum Plus Plus https://vjudge.net/contest/68966#problem/A http://www.cnblogs.com/kuangbin/archive/2011/08/04/2127085.html /* 状态dp[i][j]有前j个数,组成i组的和的最大值.决策: 第j个数,是在第包含在第i组里面,还是自己独立成组. 方程 dp[i][j]=Max(dp[i][j-1]+a[j] , max( dp[i-1][k] ) + a[j] )…
https://vjudge.net/contest/68966#problem/D http://blog.csdn.net/u010489389/article/details/19218795 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cmath> #include<…
https://vjudge.net/contest/68966#problem/G 正解一: http://www.clanfei.com/2012/04/646.html #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f u…
题意: 中文题意不解释…… 思路: 先把x,T存到矩阵里 然后像数塔一样从最底层走一边就行了 dp[i][j]代表在时间为j时 第i个位置最多能吃到多少个馅饼 最后输出第0时刻的5位置的馅饼数量就好了 /* *********************************************** Author :Sun Yuefeng Created Time :2016/11/8 18:56:49 File Name :dp.cpp ***************************…
https://vjudge.net/contest/68966#problem/F http://blog.csdn.net/libin56842/article/details/9048173 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cmath> #define INF 0…
https://vjudge.net/contest/68966#problem/E http://blog.csdn.net/to_be_better/article/details/50563344 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cmath> #define IN…
https://vjudge.net/contest/68966#problem/C [参考]http://blog.csdn.net/qinmusiyan/article/details/7986263 [题意]:多组测试数据        每组测试数据给出n个砖块的长.宽.高,每种砖块有无穷多个,可以有三种不同的放置方法(xy;xz;yz),下面的砖要比上面的砖的长和宽都大,问最大的高度是多少. [思路]:[贪心+dp]每块砖有三种放置方法,把所有砖的所有状态都压入vector,先贪心,按面…
http://www.cnblogs.com/joeylee97/p/6616039.html 引入一个cnt,输入元素与上一个元素相同,cnt增加,否则cnt减少,当cnt为零时记录输入元素,因为所求数字至少出现(N+1)/2次,所以最后记录元素就是所求元素 #include<iostream> #include<cstdio> #include<string> #include<cstring> #include<cmath> #includ…
引言: 休息一个国庆节后好久没有更新文章了,主要是刚开始休息完心态还没有调整过来的, 现在差不多进入状态了, 所以继续和大家分享下网络编程的知识,在本专题中将和大家分享如何自己实现一个简单的FTP服务器.在我们平时的上网过程中,一般都是使用FTP的客户端来对商家提供的服务器进行访问(上传.下载文件),例如我们经常用到微软的SkyDrive网盘,115网盘等,然而我们经常用到的都是网页版本的,网页版本和客户端版本的不同,网页版本的FTP客户端,它与服务器的交流是使用HTTP协议发出对服务器的请求的…
题目链接:http://poj.org/problem?id=1661 Help Jimmy Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12537   Accepted: 4160 Description "Help Jimmy" 是在下图所示的场景上完成的游戏. 场景中包括多个长度和高度各不相同的平台.地面是最低的平台,高度为零,长度无限. Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度…
引言: 在本专题中将和大家分享如何自己实现一个简单的FTP服务器.在我们平时的上网过程中,一般都是使用FTP的客户端来对商家提供的服务器进行访问(上传.下载文件),例如我们经常用到微软的SkyDrive网盘,115网盘等,然而我们经常用到的都是网页版本的,网页版本和客户端版本的不同,网页版本的FTP客户端,它与服务器的交流是使用HTTP协议发出对服务器的请求的,而客户端版本采用的是FTP协议发出命令对服务器进行请求.然后我们接触到FTP服务器却很少的, 所以本专题中将和大家介绍下如何实现一个FT…
给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S 两组case之间由空行隔开(该空行不用处理) 字符串长度len <= 110000Output每一行一个整数x,对应一组case,表示该组case的字符串中所包含的最长回文长度. Sample Input aaaa abab Sample Out…
It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "abab" The prefixes are: "a", "ab&qu…
After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One of these treasures is a necklace made up of 26 different kinds of gemstones, and the length of the…
One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps: First step: girls will write a long string (only contains lower case) on the paper. For example, "abcde", but 'a' in…
Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strings: String Rank SKYLONG 1 KYLONGS 2 YLONGSK 3 LONGSKY 4 ONGSKYL 5 NGSKYLO 6 GSKYLON 7 and lexicograp…
Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can equal by rotating ,we say the two necklaces are some). For example 0110 express a necklace, you can…
Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like trademarks. One of such companies is Internet Building Masters (IBM), which has recently asked ACM for a he…