果枫-国峰

2012年9月8日

hdu 1160 题意

摘要: 题意:第1列单调递增,第2列单调递减,满足这两个要求最长的子序列。ac代码:View Code #include<iostream>#include<stack>#include<algorithm>using namespace std;struct node{ int num;//记录输入的顺序 int weight; int rate; const bool operator<(struct node &d)const{ //重载小于号,作用:结构体中的元素按weight的升序排列 return weight<d.weight; } 阅读全文

posted @ 2012-09-08 19:59 果枫-国峰 阅读(288) 评论(0) 推荐(0) 编辑

导航