链接: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…
Problem - 2892 这道题的做法是以圆心为原点,对多边形进行三角剖分.题目描述中,多边形的可能是顺时针或者是逆时针给出,不过在我的做法里,是用有向面积来计算的,和常见的多边形面积的求法类似,不过就是多了三角形与圆交的情况.三角形于圆交的情况共三种(因为这里的三角形其中一个点是圆心,另外两个点是多边形上相邻的两个顶点,所以我们只考虑多边形的边与圆相交的情况):与多边形的边(一条线段)没有交点,一个交点,两个交点. 敲这份代码最大的问题是敲的过程中有很多小错误,导致最后花了将近小时来deb…
题意:如题 思路:离散.将所有交点求出来,相当于将多变形的边切成了很多条元边,对每条元边,有两种情况 在圆内,答案加上此边长 在圆外,答案加上此边相对于圆心的"有向转弧" #include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "local.h" #endif #define X first #define Y second #define pb(x) pus…
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…