uestc 1546 Bracket Sequence 线段树区间合并
摘要:
用-1表示’(‘,1表示’)‘,那么一个区间合法的充要条件就是最大前缀和最小后缀都为0为了维护这两个值,还需要维护多三个:区间和,最小前缀,最大后缀。见(Merge函数)//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long lon 阅读全文
posted @ 2013-08-19 11:23 BMan、 阅读(264) 评论(0) 推荐(0) 编辑