A - Abstract Art #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pair<LL, LL> #define PLI pair<LL, int> #define PII pair<int, int> #define SZ(x) ((int)x.size()) #defi…
手抄码板大法. #include<bits/stdc++.h> using namespace std; #define mp make_pair typedef long long ll; const double inf=1e200; ; *atan(1.0); :(x<?-:);} struct point{ double x,y; point(,):x(a),y(b){} }; point operator +(point A,point B) { return point(A.…
题意:给定几个圆,求最短的围合,把这几个包围起来,而且到圆的距离都不小于10. 思路:把每个圆的半径+10,边等分5000份,然后求凸包即可. #include<bits/stdc++.h> using namespace std; #define mp make_pair typedef long long ll; const double inf=1e200; ; *atan(1.0); :(x<?-:);} struct point{ double x,y; point(,):x(…
链接: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…
/* poj 1279 Art Gallery - 求多边形核的面积 */ #include<stdio.h> #include<math.h> #include <algorithm> using namespace std; const double eps=1e-8; struct point { double x,y; }dian[20000+10]; point jiao[203]; struct line { point s,e; double angle;…
2642: 填空题:类模板---求数组的最大值 时间限制: 1 Sec  内存限制: 128 MB 提交: 646  解决: 446 题目描述   类模板---求数组的最大值    找出一个数组中的元素的最大值,数组大小为10.(用类模板来实现)    数组元素类型作为类模板的参数.    在下面的程序段基础上完成设计,只提交begin到end部分的代码   #include <iostream>  #include <string>  using namespace std; …
题目链接: 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…
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and…
题面 题意:给出小于10个点形成的凸多边形 和一个半径为r 可以移动的圆 求圆心在何处的面积交最大,面积为多少 题解:三分套三分求出圆心位置,再用圆与多边形面积求交 #include<bits/stdc++.h> #define inf 1000000000000 #define M 100009 #define eps 1e-12 #define PI acos(-1.0) using namespace std; struct node { double x,y; node(){} nod…
Gym - 101667H:https://vjudge.net/problem/Gym-101667H 参考:https://blog.csdn.net/weixin_37517391/article/details/80154299 题意: 已知两个人出剪刀石头布的顺序,第二个人可以选择从第一个人的任意手开始正式比赛,问第二个人赢得个数最多是多少. 思路: 首先肯定要把第二个人所代表的字符串T转化为对应能赢的字符串rT.这时候暴力的话就是把rT拿去和第一个人的字符串匹配. 这里就可以用FFT…