摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1520#include#include#include#include#include#include#includeusing namespace std;const int maxn = 6050;const int maxe = 10000;const int INF = 0x3f3f3f;struct Edge{ int u,v; int next; void assign(int u_,int v_,int next_){ u = u_; v = v_... 阅读全文
posted @ 2013-08-10 19:44 等待最好的两个人 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3409参考博客:http://www.cnblogs.com/woaishizhan/p/3189813.html#include#include#include#include#include#include#includeusing namespace std;const int maxn = 205;const int maxe = 20500;const int INF = 0x3f3f3f;struct Edge{ int u,v,w; int next; void as... 阅读全文
posted @ 2013-08-10 19:39 等待最好的两个人 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2896大概思路:A和B运动,以A(Posa)为参考点,求出B的运动轨迹(Posb -> Posb + Vb-Va);#include#include#include#include#include#includeusing namespace std;const int maxn = 60;const int maxe = 100000;const int INF 阅读全文
posted @ 2013-08-07 22:16 等待最好的两个人 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1264#include#include#include#include#include#includeusing namespace std;const int maxn = 310;const int maxe = 100000;const int INF = 0x3f3f3f;struct Point{ double x,y; Point(double 阅读全文
posted @ 2013-08-07 16:38 等待最好的两个人 阅读(214) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#includeusing namespace std;struct Point{ double x,y; Point(double x=0, double y=0) : x(x),y(y){ } //构造函数};typedef Point Vector;Vector operator + (Vector A , Vector B){return Vector(A.x+B.x,A.y+B.y);}Vector operator - (Vector A , Vector B){ret... 阅读全文
posted @ 2013-08-07 14:55 等待最好的两个人 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1706trick:关于正数和负数的整除问题,正数整除是自动向下取整的,但负数是向上取整的即13/3=4.3 ->4 但-13/3=-4.3 ->-4#include #include #include #include #include #include #include #define maxn 32500#define maxe 11000#define INF 0x3f3f3f#define lson l,mid,u mid) Update(... 阅读全文
posted @ 2013-08-05 01:50 等待最好的两个人 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3365#include #include #include #include #include #include #include #define maxn 50500#define maxe 11000#define INF 0x3f3f3fusing namespace std; int a[maxn],b[maxn];int main(){ //freopen("input.txt","r",stdin); int 阅读全文
posted @ 2013-08-04 21:47 等待最好的两个人 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2404#include #include #include #include #include #include #include #define maxn 550#define maxe 100000 #define INF 0x3f3f3fusing namespace std;struct Edge{ int from,to,cap,flow,cost; int next; void assign(int a,int b,int c,i... 阅读全文
posted @ 2013-08-04 18:24 等待最好的两个人 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2836#include #include #include #include #include #include #include #define maxn 15#define INF 0x3f3f3fusing namespace std;int a[maxn];int N;long long ans,M;int gcd(int a,int b){ //printf("%d %d\n",a,b); if(a%b == 0) return b 阅读全文
posted @ 2013-08-04 18:22 等待最好的两个人 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3357#include #include #include #include #include #include #include #define maxn 250#define maxe 100050#define INF 0x3f3f3fusing namespace std;int N,T;int ans;bool G[maxn][maxn];int l[maxn];int r[maxn];int lhead,ltail,rhead,rtail;int main(){ //freope... 阅读全文
posted @ 2013-08-04 02:11 等待最好的两个人 阅读(212) 评论(0) 推荐(0) 编辑