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…
题意:给定几个圆,求最短的围合,把这几个包围起来,而且到圆的距离都不小于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(…
手抄码板大法. #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.…
题面 题意:给你一个半圆,和另一个多边形(可凹可凸),求面积交 题解:直接上板子,因为其实这个多边形不会穿过这个半圆,所以他和圆的交也就是和半圆的交 打的时候队友说凹的不行,不是板题,后面想想,圆与多边形面积交本来就是拆成有向三角形做的,所以无论凹凸了 #include<bits/stdc++.h> #define inf 1000000000000 #define M 100009 #define eps 1e-12 #define PI acos(-1.0) using namespace…
http://poj.org/problem?id=1279 顺时针给你一个多边形...求能看到所有点的面积...用半平面对所有边取交即可,模版题 这里的半平面交是O(n^2)的算法...比较逗比...暴力对每条线段做半平面交...要注意的地方写在注释里了...顺序写反了卡了我好久 /********************* Template ************************/ #include <set> #include <map> #include <…
题意:求多边形的核的面积 套模板即可 #include <iostream> #include <cstdio> #include <cmath> #define eps 1e-18 using namespace std; const int MAXN = 1555; double a, b, c; int n, cnt; struct Point { double x, y; double operator ^(const Point &b) const {…
Gerald is into Art Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to attach it to the wall and place the paintings on the board. The board has shape of an a…
B. Gerald is into Art Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/560/B Description Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought…
 Gerald is into Art time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bo…
B. Gerald is into Art Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/560/problem/B Description Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a…
B. Gerald is into Art time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he…
题目描述 Arty has been an abstract artist since childhood, and his works have taken on many forms. His latest (and most pricey) creations are lovingly referred to as Abstract Art within the abstract art community (they’re not the most original bunch when…
[CF简单介绍] 提交链接:http://codeforces.com/contest/560/problem/B 题面: B. Gerald is into Art time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald bought two very rare paintings at the Sotheby's a…
B. Gerald is into Art time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to…
题目链接:http://codeforces.com/gym/101873/problem/G 题意: 在点阵上,给出 $N$ 个点的坐标(全部都是在格点上),将它们按顺序连接可以构成一个多边形,求该多边形内包含的格点的数目. 题解: 首先,根据皮克定理 $S = a + \frac{b}{2} - 1$,其中 $S$ 是多边形面积,$a$ 是多边形内部格点数目,$b$ 是多边形边界上的格点数目. 那么,我们只要求出 $S$ 和 $b$,就很好求得 $a$ 了: 1.对于两端点 $(x_1,y_…
/* 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;…
计算几何/半平面交 裸的半平面交,关于半平面交的入门请看神犇博客:http://blog.csdn.net/accry/article/details/6070621 然而代码我是抄的proverbs的…… 大体思路是这样的:(一个增量算法) 维护一个当前的半平面交的点集,每次用一条直线去cut它: 依次枚举“凸包”上的点,点在直线左边则保留下来了,否则就丢掉=.= 同时判一下如果“凸包”上连续的两个点分别在直线两侧,就加入这条“凸包”上的线段与直线的交点= = 然后新点集get! 最后求个面积…
地址:http://poj.org/problem?id=1279 题目: Art Gallery Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7329   Accepted: 2938 Description The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the f…
layout: post title: (寒假开黑gym)2017-2018 ACM-ICPC German Collegiate Programming Contest (GCPC 2017) author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队! 许老师! B.Buildings (polya定理) 题意 B:给你m面墙,每面墙是n*n的格子,你有c种颜色,问你有多少种涂色方案.用po…
layout: post title: (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队! 许老师! Hello SCPC 2018! (签到) #include<bits/stdc++.h> using namespace std; typedef…
题目链接 https://codeforces.com/gym/101917 E 题意:给定一个多边形(n个点),然后逆时针旋转A度,然后对多边形进行规约,每个点的x规约到[0,w]范围内,y规约到[0,h]范围内,输出规约后的结果. 解析:求出来 多边形的长和宽,再和w,h比较,对点按比例进行缩放就好了. (多边形旋转其实是绕给出的第一个点旋转,以为是绕原点wa了1发). AC代码 #include <bits/stdc++.h> #define Vector Point using nam…
英语新闻常用词汇与短语 经济篇 accumulated deficit 累计赤字 active trade balance 贸易顺差 adverse trade balance 贸易逆差 aid 援助 allocation of funds 资金分配 allotment 拨款 allowance/grant/subsidy 补贴,补助金,津贴 amortization 摊销,摊还,分期偿付 annuity 年金 article 物品,商品 assigned 过户 autarchy 闭关自守 av…
A. Currency System in Geraldion time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several valu…
Directions For tiis part,you are allowed 30 minutes to write an essay.Suppose there are two options upon the square dance: One is severe prohibition and the other permission.You are to make a choice between the two .Write an essay to eaplain the reas…
A .Abstract Art 题意:求多个多边形的面积并. 思路:模板题. #include<bits/stdc++.h> using namespace std; 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) { retur…
贪心.能凑成一组就算一组 Unrhymable Rhymes Time Limit: 10 Seconds      Memory Limit: 32768 KB      Special Judge An amateur poet Willy is going to write his first abstract poem. Since abstract art does not give much care to the meaning of the poem, Willy is plan…
A:Abstract Art 题意:给出n个多边形,求n个多边形分别的面积和,以及面积并 思路:模板 #include <bits/stdc++.h> using namespace std; #define N 1010 #define mkp make_pair ; inline int sgn(double x) { ; ) ; ; } struct Point { double x, y; inline Point() {} inline Point(double x, double…
ECNA 2017 Abstract Art 题目描述:求\(n\)个多边形的面积并. solution 据说有模板. Craters 题目描述:给定\(n\)个圆,求凸包的周长. solution 求出两两圆的公切线的切点,做凸包,算周长时判断两个点是否在同一个圆上,以及是优弧还是劣弧. 或是将每个圆拆成\(3000\),做凸包,算周长时判断两个点是否在同一个圆上. 时间复杂度:\(O(n^2)\) DRM Messages 题目描述: solution 模拟 Game of Throwns…
Unrhymable Rhymes Time Limit:10000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Description An amateur poet Willy is going to write his first abstract poem. Since abstract art does not give much care to the meaning of the poem, Willy is…