摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1160思路:就是排序后求最长递增子序列,只不过多了一个判断(s下降)以及最后输出下标,我们可以用一个pre[]数组来记录路径,最后递归输出就行了。 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 #define MAXN 1010 7 struct Mice{ 8 int w,s,id; 阅读全文
posted @ 2013-05-13 21:55 ihge2k 阅读(398) 评论(0) 推荐(0) 编辑