摘要:
http://acm.nyist.net/JudgeOnline/problem.php?pid=78原来Graham都是模板直接上的,这次是自己写的,发现自己尽是细节没搞好View Code 1 #include <iostream> 2 #include <algorithm> 3 using namespace std; 4 const int maxn = 105; 5 struct Point 6 { 7 float x,y; 8 }p[maxn],stack[maxn]; 9 10 double xmult(Point p1,Point p2,Point p 阅读全文
posted @ 2012-09-29 22:55
YORU
阅读(242)
评论(0)
推荐(0)
摘要:
今天照着自己的理解写了Graham.自己写错了很多次,所以先前看到的可能错了。。View Code 1 const int maxn = 105; 2 struct Point 3 { 4 float x,y; 5 }p[maxn],stack[maxn]; 6 7 double xmult(Point p1,Point p2,Point p0) //cross product 8 { 9 return (p1.x-p0.x)*(p2.y-p0.y)-(p1.y-p0.y)*(p2.x-p0.x);10 }11 12 double dis(Point p1,... 阅读全文
posted @ 2012-09-29 21:06
YORU
阅读(174)
评论(0)
推荐(0)
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3654首先必须说自己今天很2。。。。。一个数据范围搞了那么久,还有就是自己对表达式的理解上也有问题。。。。View Code 1 #include <stdio.h> 2 #include <string.h> 3 #define maxn 2012 4 long long ans; 5 char str[maxn]; 6 7 void cal(char str[]) 8 { 9 int i,j,len,f,mark;10 long long te 阅读全文
posted @ 2012-09-29 19:56
YORU
阅读(297)
评论(0)
推荐(0)

浙公网安备 33010602011771号