摘要:
CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include<iostream>#include<algorithm>usingnamespacestd;constintMAXN=55;typedefstruct{doublex,y;}Point;Pointp[MAXN];Pointp0={0,0};boolcmp1(constPoint&a,constPoint&b)//y升序,y相同x升 阅读全文
摘要:
CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//公式a^2-b^2-c^2+2bccosA=0=>cosA=(b^2+c^2-a^2)/2bc,sinA/a=sinB/b=sinC/c=1/2R#include<iostream>#include<math.h>usingnamespacestd;constdoublepi=acos(-1.0);typedefstruct{doublex,y;}Poi 阅读全文
摘要:
CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//题意:给定一张有向图,边有权值,要你计算从min[1N](某点开始到达其他所有点的最短时间的和)//思路:用Floyd做,求两点间的最短距离,时间复杂度为O(N^3)#include<iostream>usingnamespacestd;constintMAXN=102;constintINF=-1u>>1;intmap[MAXN][MAXN];intMax[ 阅读全文