题目 题意:首先给定一个以原点为圆心,R为半径的圆,之后在给m个圆,这些圆可能会和原来的圆有所交集,计算开始的圆剩余区域的周长,不包括内部周长. 首先判定两圆关系,如果内含,直接加上圆的周长,如果相交,在计算对应弧长,其他情况都不用计算.在计算圆心角的时候,有个精度问题,只用本身半径算出来的弧度会不够,所有用上两个圆的半径. #include<iostream> #include<algorithm> #include<cstdio> #include<cmath…
对于两圆的位置一般有五种关系: (1) 外离:两圆的半径之和小于两圆圆心距离 (2) 外切:两圆的半径之和等于两圆圆心距离 (3) 相交:两圆的半径之和大于两圆圆心距离,两圆圆心距离大于两圆半径之差 (4) 内切:两圆的半径之差等于两圆圆心距离 (5) 内含:两圆的半径之差小于两圆圆心距离 具体实现C++代码如下: #include<iostream>#include<cmath>using namespace std;class Point {private: double m_…
题意:源点处有个圆,然后给你m个圆(保证互不相交.内含),如果源点圆和这些原相交了,就剪掉相交的部分,问你最后周长(最外面那部分的长度). 思路:分类讨论,只有内切和相交会变化周长,然后乱搞就行了.题目好像不用讨论给的圆包含源点圆的情况(0?),那么只剩内含(不变).相切(增加小圆周长).相离(不变).相交(余弦定理求一下).余弦定理都快忘了,本来打算构建rt三角形233.学到一招pi = acos(-1.0). 代码: #include<cstdio> #include<set>…
1118 - Incredible Molecules      PDF (English) Statistics Forum Time Limit: 0.5 second(s) Memory Limit: 32 MB In the biological lab, you were examining some of the molecules. You got some interesting behavior about some of the molecules. There are so…
Home Web Board ProblemSet Standing Status Statistics   Problem D: 判断两个圆之间的关系 Problem D: 判断两个圆之间的关系 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 381  Solved: 325[Submit][Status][Web Board] Description 定义Point类,包括double类型的两个属性,分别表示二维空间中一个点的横纵坐标:定义其必要…
Pick-up sticks Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1872    Accepted Submission(s): 706 Problem Description Stan has n sticks of various length. He throws them one at a time on the fl…
You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6425    Accepted Submission(s): 3099 Problem Description Many geometry(几何)problems were designed in the ACM/I…
题意: 给出两个圆的圆心坐标和半径,求这两个圆的公切线切点的坐标及对应线段长度.若两圆重合,有无数条公切线则输出-1. 输出是按照一定顺序输出的. 分析: 首先情况比较多,要一一判断,不要漏掉. 如果高中的那点老底还在的话,代码还是很好理解的. //#define LOCAL #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vect…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=3264 题意:给你n个圆,坐标和半径,然后要在这n个圆的圆心画一个大圆,大圆与这n个圆相交的面积必须大于等于每个圆面积的一半,问你建在那个圆心半径最小,为多少. 题解:枚举这n个圆,求每个圆的最小半径,通过二分半径来求,然后取这n个的最小值即可,注意点精度就OK了. AC代码: #include <iostream> #include <cstdio> #include <cstri…
Edward is a worker for Aluminum Cyclic Machinery. His work is operating mechanical arms to cut out designed models. Here is a brief introduction of his work. Assume the operating plane ,) and radius R. Then, m mechanical arms will cut and erase every…