摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1559思路:感觉就是1081这题差不多,但就是加了一个限制条件。。。View Code 1 #include<iostream> 2 #include<algorithm> 3 const int N=1010; 4 using namespace std; 5 6 int map[N][N]; 7 8 int main(){ 9 int _case;10 scanf("%d",&_case);11 while(_case--){12 int m, 阅读全文
posted @ 2013-03-15 19:15 ihge2k 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1081思路:其实就是化二维为一维,可以把有相同行数的每一列的最大值求出来就可以了,每次都更新就行了。。。View Code 1 #include<iostream> 2 const int N=110; 3 const int inf=1000000000; 4 using namespace std; 5 6 int num[N][N]; 7 int dp[N]; 8 9 int main(){10 int n;11 while(~scanf("%d",&n 阅读全文
posted @ 2013-03-15 11:51 ihge2k 阅读(584) 评论(0) 推荐(1) 编辑