divided专题

Tree的Traverse and divided conquer

Tree的traverse,Preorder, Inorder, Postorder ,这些都是用stack来模拟考察的比较多。参考这里: PreOrder, InOrder, PostOrder 题型总结  这里主要总结,divide and conquer 逻辑,往上返回result的情况; Lowest Common Ancestor of a Binary Search Tree 思路

HDU 5050 Divided Land

http://acm.hdu.edu.cn/showproblem.php?pid=5050 Divided Land Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 713    Accepted Submission(s): 339

hdu5050_2014ACM上海__Divided Land

本文出自:点击打开链接 原题见hdu5050 代码: #include <iostream>#include <stdio.h>#include <string.h>#include <vector>#include <map>#include <algorithm>#include <queue>#include <cmath>#include <bitse