摘要:
题意:在一个序列中找出最长的某个序列。找出的序列满足题中的条件。关键:对于 第 i 个位置上的数,要知道与之相隔至少d的位置上的数的大小。可以利用线段树进行统计,查询。更新的时候利用dp的思想。 1 /* 2 统计某一段内有多少比aim小的数据 3 在更新的时候利用了dp的思想。 4 */ 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 const int maxn = 100005;11 struct node{12 int sum,l,r;13 }anode[ maxn1 )64 ... 阅读全文
posted @ 2013-07-11 16:20
xxx0624
阅读(586)
评论(0)
推荐(0)

浙公网安备 33010602011771号