View Code #include<stdio.h>#include<math.h>#include<iostream>using namespace std;typedef __int64 lld;void gcd(lld a,lld b,lld &d,lld &x,lld &y){ if(!b) {d=a;x=1;y=0;} else { gcd(b,a%b,d,y,x);y-=x*(a/b);}}int main(){ lld x,y,m,n,l; lld a,b,c,d,g,s; scanf("%I64d%I64d Read More
posted @ 2011-09-12 20:50 Because Of You Views(229) Comments(0) Diggs(0) Edit
现在还不怎么适应比赛的节奏啊,二分边长即可,余弦定理求角度即可,注意,要先判断所选取的边是否合法View Code #include<stdio.h>#include<string.h>#include<math.h>#include<stdlib.h>const double pi = acos(-1.0);const double expn=1e-8;double a[110];int n;double get_angel(double x,double y,double z){ return acos((x*x+y*y-z*z)/(2*x* Read More
posted @ 2011-09-12 15:28 Because Of You Views(261) Comments(0) Diggs(0) Edit