摘要: 这道题目也比较简单,先想好怎么写,稍微写写伪代码,之后实现了即可。/*ID: zhangyc1LANG: C++TASK: starry*/#include <string>#include <cstring>#include <cstdlib>#include <cstdio>using namespace std;struct SStar { int nStarNum, nLeft, nRight, nTop, nBottom; bool arrIsStar[100][100]; SStar():nStarNum(1), nLeft(0), 阅读全文
posted @ 2013-04-19 12:24 J.Z's World 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 这道题目是很标准的凸包问题,看了第五章开头的说明,照着写就好。 判断向量夹角用交叉积,右手螺旋,注意交叉积不满足交换率,所以要注意前后顺序。/*ID: zhangyc1LANG: C++TASK: fc*/#include <string>#include <cstring>#include <cstdlib>#include <cstdio>#include <cmath>using namespace std;struct SPoint { double x, y, theta;};SPoint arrPoint[10000], 阅读全文
posted @ 2013-04-19 12:23 J.Z's World 阅读(164) 评论(0) 推荐(0) 编辑