The Designer Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 761 Accepted Submission(s): 142 Problem Description Nowadays, little haha got a problem from his teacher.His teacher wants to desi…
本文版权归BobHuang和博客园共有,不得转载.如想转载,请联系作者,并注明出处. Nowadays, little hahahaha got a problem from his teacher.His teacher wants to design a big logo for the campus with some circles tangent with each other. And now, here comes the problem. The teacher want t…
Nowadays, little haha got a problem from his teacher.His teacher wants to design a big logo for the campus with some circles tangent with each other. And now, here comes the problem. The teacher want to draw the logo on a big plane. You could see the…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1506 关于笛卡尔树的构建:https://www.cnblogs.com/reverymoon/p/9525764.html 笛卡尔树在 key 上满足二叉搜索树,在 value 上满足堆:一般 key 就是原序列里的位置,这样一个子树对应原序列的一段连续区间. 这个构建方法就是给最右链维护单调栈,新进来第 i 个元素之后,根据 value 是堆的规则弹栈,然后把自己的左孩子设成最后弹掉的那个点,把自己…