题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1669 思路:由于要求minimize the size of the largest group,由此我们想到二分枚举,然后每一次求一下多重匹配就可以了. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<vector> using n…
Marriage Match III Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1971 Accepted Submission(s): 583 Problem Description Presumably, you all have known the question of stable marriage match.…
Marriage Match II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3558 Accepted Submission(s): 1158 Problem Description Presumably, you all have known the question of stable marriage match. A…
GCD Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Submission(s): Problem Description Give you a sequence of N(N≤,) integers : a1,...,an(<ai≤,,). There are Q(Q≤,) queries. For each query l,r you have to c…
题目链接 Problem Description The center coordinate of the circle C is O, the coordinate of O is (0,0) , and the radius is r.P and Q are two points not outside the circle, and PO = QO.You need to find a point D on the circle, which makes PD+QD minimum.Out…
Incircle and Circumcircle Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge A triangle is one the basic shapes in geometry. It's a polygon with three vertices and three sides which are line segments. A triangle with vertices A, B, C is denot…
[CF744D]Hongcow Draws a Circle 题意:给你平面上n个红点和m个蓝点,求一个最大的圆,满足圆内不存在蓝点,且至少包含一个红点. $n,m\le 10^3$ 题解:我们先不考虑半径为inf的情况.显然所求的圆一定是要与某个蓝点相切的.我们可以先枚举这个蓝点,然后二分答案.当半径已知.一个点固定时,圆的可能位置只能是绕着一个点旋转得到的结果,其余的所有点都对应着极角上的一段区间,我们可以将这些区间排序,采用扫描线,看一下是否存在一段区间包含红点且不包含蓝点即可. 但是如果…