area Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 686    Accepted Submission(s): 265 Problem Description 小白最近被空军特招为飞行员,参与一项实战演习.演习的内容是轰炸某个岛屿...作为一名优秀的飞行员,任务是必须要完成的,当然,凭借小白出色的操作,顺利地将炸弹投到了岛上某个位…
链接:https://www.nowcoder.com/acm/contest/141/J来源:牛客网 Eddy has graduated from college. Currently, he is finding his future job and a place to live. Since Eddy is currently living in Tien-long country, he wants to choose a place inside Tien-long country…
题意: 求所有满足PB <= k*PA 的P所在区域与多边形的交面积. 解法: 2014广州赛区的银牌题,当时竟然没发现是圆,然后就没做出来,然后就gg了. 圆的一般式方程: 设A(x1,y1),B(x2,y2),P(x,y), 那么有 最后化成: 一般式里面的D,E,F自然就出来了,如果不记得一般式的话也可以自己推圆心和半径的,然后就是套的模板,模板的原理自己理吧. 代码: #include <iostream> #include <cstdio> #include <…
之前几乎没写过什么这种几何的计算题.在众多大佬的博客下终于记起来了当时的公式.嘚赶快补计算几何和概率论的坑了... 这题的要求,在对两圆相交的板子略做修改后,很容易实现.这里直接给出代码.重点的部分有:两圆在相离(或外交)时输出第一个圆的面积.内涵(或内切)则需要分类讨论,是羊的圈大.还是狼的圈大.以下是代码: #include<iostream> #include<cmath> #include<stdio.h> using namespace std; int ma…
题目传送门 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…
Open-air shopping malls Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2344    Accepted Submission(s): 866 Problem Description The city of M is a famous shopping city and its open-air shopping…
Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examples you may know. A ring is a 2-D figure bounded by two circles sharing the common center. The radius for these circles…
链接:https://www.nowcoder.com/acm/contest/141/J 题目描述 Eddy has graduated from college. Currently, he is finding his future job and a place to live. Since Eddy is currently living in Tien-long country, he wants to choose a place inside Tien-long country…
题意:给出多边形的顶点坐标.圆的圆心坐标和半径,求面积交 sol:又是模板题啦= = 注意poj的C++好像认不出hypot函数,要稍微改写一下. hypot(double x,double y):即返回sqrt(x*x+y*y)的值 #include<vector> #include<list> #include<map> #include<set> #include<deque> #include<queue> #include&…
链接 多边形的面积求解是通过选取一个点(通常为原点或者多边形的第一个点)和其它边组成的三角形的有向面积. 对于两个多边形的相交面积就可以通过把多边形分解为三角形,求出三角形的有向面积递加.三角形为凸多边形,因此可以直接用凸多边形相交求面积的模板. 凸多边形相交后的部分肯定还是凸多边形,所以只需要判断哪些点是相交部分上的点,最后求下面积. #include <iostream> #include<cstdio> #include<cstring> #include<…