1133: 膜拜大牛 Time Limit: 1 Sec  Memory Limit: 131072KiBSubmit: 9619  Solved: 3287 题目连接 http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1133 Description 由于wywcgs是个很菜的菜鸟,所以每到一个新的地方,他都必须去膜拜当地的大牛.但是大牛们都没空理他,所以无可奈何之下,wywcgs只能寻找其他 的办法.为了一次Orz到更多的大牛,他想到了一个好方…
题目链接: POJ:http://poj.org/problem? id=2546 ZOJ:problemId=597" target="_blank">http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=597 Description Your task is to write a program, which, given two circles, calculates the area of the…
转载 两圆相交分如下集中情况:相离.相切.相交.包含. 设两圆圆心分别是O1和O2,半径分别是r1和r2,设d为两圆心距离.又因为两圆有大有小,我们设较小的圆是O1. 相离相切的面积为零,代码如下: double d = sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y)); if (d >= r1+r2) return 0; double d = sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y)); if (…
已知两圆圆心坐标和半径,求相交部分面积: #include <iostream> using namespace std; #include<cmath> #include<stdio.h> #define PI 3.141593 struct point//点 { double x,y; }; struct circle//圆 { point center; double r; }; float dist(point a,point b)//求圆心距 { return…
题意:平面上有一些半径为R的圆,现在要在满足不与现有圆相交的条件下放入一个圆,求这个圆能放的位置的圆心到原点的最短距离. 解法:我们将半径扩大一倍,R = 2*R,那么在每个圆上或圆外的位置都可以放圆心了. 首先特判放到原点可不可以,如果不可以,再将所有圆的圆心与原点的直线与该圆相交的点放入队列,再将所有圆两两相交的点放入队列,然后处理整个队列,一一判断这些点行不行,可以证明,最优点一定在这些里面. 如果有一个圆的圆心在(0,0)点,那么要特判一下,因为此时圆心与原点连的直线长度为0,对于这种情…
Description The city of M is a famous shopping city and its open-air shopping malls are extremely attractive. During the tourist seasons, thousands of people crowded into these shopping malls and enjoy the vary-different shopping. Unfortunately, the…
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…
题目传送门 Hard problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1066    Accepted Submission(s): 622 Problem Description cjj is fun with math problem. One day he found a Olympic Mathematics pr…
链接 画图推公式 这两种情况 都可用一种公式算出来 就是两圆都求出圆心角 求出扇形的面积减掉三角形面积 #include <iostream> using namespace std; #include<cmath> #include<iomanip> #include<algorithm> int main() { double d,t,t1,s,x,y,xx,yy,r,rr; while(cin>>x>>y>>r) {…
题意:告诉你两个圆环,求圆环相交的面积. /* gyt Live up to every day */ #include<cstdio> #include<cmath> #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<cstring> #include<queue> #include<set&…