2012年7月25日

Problem B. Money out of Thin Air

摘要: 算法:1.先用DFS把员工之间关系系列找出,使之连续,转换为对线段进行操作,用L【】记录左边界,R【】记录右边界。2.线段树,单点更新,区间更新,lazy延时标记。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>using namespace std;#define MAXN 51000#define LL long longstruct node{ int left, right; LL 阅读全文

posted @ 2012-07-25 07:41 more think, more gains 阅读(171) 评论(0) 推荐(0) 编辑

导航