摘要:
代码如下: 1 #include <cstdio> 2 #include <cmath> 3 #include <algorithm> 4 5 void solve(); 6 int L,sx,sy,px,py; 7 8 int main() 9 {10 while(scanf("%d",&L),L)11 {12 scanf("%d%d%d%d",&sx,&sy,&px,&py);13 14 if(py > L || px > L || py < -L || p
阅读全文
posted @ 2012-05-20 21:44
Shirlies
阅读(310)
推荐(0)
编辑
摘要:
凸包代码如下: 1 #include <cstdio> 2 #include <algorithm> 3 #include <cstring> 4 #include <cmath> 5 using namespace std; 6 7 struct node 8 { 9 int x,y;10 }p[1000],stack[1000];11 int n,top;12 13 double dis(node &a,node &b)14 {15 return sqrt(1.0*(a.x - b.x) * (a.x - b.x) + 1.0
阅读全文
posted @ 2012-05-20 21:35
Shirlies
阅读(172)
推荐(0)
编辑