摘要: 反着考虑第N个必然在a或者c上。而第N-1个必须先移到b顺次考虑下去 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 freopen("output.txt","r",stdin);//从文件output.txt读入 7 freopen("input.txt","w",stdout);//写入到文件input.txt 8 int N; 9 bool flag;10 int cas;11 cin>>cas;12 阅读全文
posted @ 2012-05-03 14:45 南柯南 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<stdlib.h> 3 #include<cmath> 4 #include<stdio.h> 5 using namespace std; 6 int n; 7 typedef struct 8 { 9 double x; 10 double y; 11 }Point; 12 13 Point p[110],s[110]; 14 15 int top; 16 17 double Mul(Point a, Point b, Point c) 18 { 19 return (b.x . 阅读全文
posted @ 2012-05-03 14:45 南柯南 阅读(219) 评论(0) 推荐(0) 编辑