摘要:
拓扑排序 题目做的烦,题解写着玩 "POJ 2762 Going from u to v or from v to u?" 有向图,之间定义这样的关系,u能到达v或者v能到达u,则满足关系 观察知,即拓扑排序中队列中不能有两个节点 code "POJ 3687 Labeling Balls" 重量为 阅读全文
摘要:
Codeforces Round 542 (Div. 2) 题目做不下去的我写一写题解 A. Be Positive 水题,考虑正数,负数个数是否$\geq \lceil \frac{n}{2} \rceil$ B. Two Cakes 给定位置大小为1...n的蛋糕,每种大小共两份,要求两个人从最 阅读全文
摘要:
bfs+优先队列 代码 cpp //bfs // include include include include include include using namespace std; define CL(a,b) memset(a,b,sizeof(a)) const int maxm=305; 阅读全文
摘要:
vj线段树专题题解 单点更新模板 cpp // include include include include include include using namespace std; define maxn 20010 struct poster{ int lb,rb;//left bound } 阅读全文