打算专题训练下DP,做一道帖一道吧~~现在的代码风格完全变了~~大概是懒了.所以.将就着看吧~哈哈 Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work in t…
Description Nowadays, a kind of chess game called "Super Jumping! Jumping! Jumping!" is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game can be played by two or more than two…
Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows the histogram that consists of rectang…
A 回文串的最小划分 题意:给出长度不超过1000的字符串,把它分割成若干个回文字串,求能分成的最少字串数. #include <iostream> #include <cstdio> #include <string.h> #include <string> using namespace std; ; + ; const int INF = 0x3f3f3f3f; typedef long long LL; int dp[maxn]; //根据回文串的特…
1.内存控制2.敌兵布阵4.广告牌5.区间第k大数(模板题)6.just a Hook7.I Hate It8.动态的最长递增子序列(区间更新题)9.图灵树10.覆盖的面积14.买票问题16.村庄问题17.Hotel19.矩形周长问题23.区间第k大数问题26.海报问题 1001 /* 内存控制 4种操作: 1.Reset 初始化 2.New x 开辟长度为x的连续的空间,输出起始位置 3.Free x 释放包含第x字节的块,整块都释放掉 4.Get x 输出当前状态下,内存里第x块的起始位置…
POJ2449 Remmarguts' Date UDF's capital consists of N stations. The hall is numbered S, while the station numbered T denotes prince' current place. M muddy directed sideways connect some of the stations. Remmarguts' path to welcome the princess might…
推荐以下一篇博客:https://blog.csdn.net/wust_zzwh/article/details/52100392 1.(HDOJ2089)http://acm.hdu.edu.cn/showproblem.php?pid=2089 分析:裸模板题 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; ]; ][]…