ecna2017-Sheba’s Amoebas】的更多相关文章

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…
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…
很简单的深搜的一道题,由于这道题要找环的个数,并且认为相连当一个点的8个方向种中有一个方向和这个点相连. 这个题做法无非就是暴力每个点,然后满足条件的深搜即可. 感觉我自己的代码写的很无趣,大佬的代码都是没用vis数组判断,满足条件#的直接变成.即可 #include<bits/stdc++.h> using namespace std; ][]; ; ][]= {{,},{,-},{,},{-,},{,},{-,-},{,-},{-,}}; bool judge(int x,int y) {…
http://setosa.io/ev/eigenvectors-and-eigenvalues/ Explained Visually Tweet  By Victor Powell and Lewis Lehe Eigenvalues/vectors are instrumental to understanding electrical circuits, mechanical systems, ecology and even Google's PageRank algorithm. L…
NLTK 这是一个处理文本的python库,我们知道文字性的知识可是拥有非常庞大的数据量,故而这属于大数据系列. 本文只是浅尝辄止,目前本人并未涉及这块知识,只是偶尔好奇,才写本文. 从NLTK中的book模块中,载入所有条目 book 模块包含所有数据 from nltk.book import * *** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1, ..., sent9 Ty…
Series的简单运算 import numpy as np import pandas as pd s1=pd.Series([1,2,3],index=['A','B','C']) print(s1) 结果: A 1 B 2 C 3 dtype: int64 s2=pd.Series([4,5,6,7],index=['B','C','D','E']) print(s2) 结果: B 4 C 5 D 6 E 7 dtype: int64 print(s1+s2)#对应的index相加,NaN…