poj2932 Coneology】的更多相关文章

POJ2932 Coneology 题意: 给出一些不相交的圆,问有多少个圆不被其他圆包围 题解: 扫描线,把所有圆的左边界和右边界放到\(vector\)里排序,遍历到圆左边界的时候判断是否满足条件,到右边界的时候把这个圆从\(set\)中删掉,对于一个选到当前左边界的圆,因为不存在相交,所以只需要判断与他\(y\)坐标最近的两个在\(set\)中的圆是否包含他即可 #include<cstdio> #include<cstring> #include<iostream&g…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Coneology Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3289   Accepted: 586 Description A student named Round Square loved to play with cones. He would arrange cones with diff…
地址:http://poj.org/problem?id=2932 题目: Coneology Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4170   Accepted: 886 Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbi…
Coneology Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4097   Accepted: 859 Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbitrarily on the floor and would admire…
题意:有n个圆 依次给了半径和圆心坐标  保证输入的圆不相交(只有 相离 和 内含/外含 的情况)   问 有几个圆 不内含在其他圆中,并分别列出这几个圆的编号(1~n) (n的范围是[1, 40000]) 案例画出来大概是这样的 (那个原点为(50,50)的太远了,就意思一下) 所以答案是3号圆和5号圆 不被包含 好了,若这道题n只有1000,那么只要for两层,每个圆与另外的圆比较, 判断圆心是否在其他圆内即可判断是否包含 这样的复杂度是O($n^2$) 可是现在n有40000,显然不能用O…
题目: Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbitrarily on the floor and would admire the intrinsic beauty of the arrangement. The student even began theorizing about how som…
Coneology Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3574   Accepted: 680 Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbitrarily on the floor and would admire…
题意 平面上有N个两两不相交的圆,求全部最外层的,即不被其它圆包括的圆的个数并输出 思路 挑战程序竞赛P259页 代码 /* ********************************************** Auther: xueaohui Created Time: 2015-7-25 16:56:13 File Name : poj2932.cpp *********************************************** */ #include <iostr…
原题如下: Coneology Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4937   Accepted: 1086 Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbitrarily on the floor and would…
平面上有n个两两没有公共点的圆,i号圆的圆心在(xi,yi),半径为ri,编号从1开始.求所有最外层的,即不包含于其他圆内部的圆.输出符合要求的圆的个数和编号.n<=40000. (注意此题无相交相切!!!)工具:扫描线+set 中心思想:边界分左右端点,如图,当扫描线与k号圆左端点相切,之前用set维护一个y纵坐标的二叉树,那我们在二叉树中查找离k号圆纵坐标最近的上下两个圆(A,B),让k与A,B判是否内含即可,为什么是AB?假设有C点(离k远一些)包含k,但A不包含k,那么一定有A,C相交,…