摘要: 总结:在一个月内参加了两场比赛,这是我第一次做这么频的比赛。上个月去了黑大的黑龙江省赛,不过自己就是去打酱油的。因为是吉大出的题,A题大家都是水过了。B题是一道图的求平均最小时间花费问题,不过要处理的边权和节点的类型比较恶心,加上我们三个的图论基础不是很好,所以我也不记得有没有写了。C题是一道比较简... 阅读全文
posted @ 2014-06-21 10:57 清风旋叶 阅读(175) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1086跨立实验算法#include#include#include#includeusing namespace std;struct Point{ double x,y;} ;struct Line{ ... 阅读全文
posted @ 2014-05-24 12:02 清风旋叶 阅读(116) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1071#include#includeint main(){ //freopen("in.txt","r",stdin); int t; scanf("%d",&t); while(t--)... 阅读全文
posted @ 2014-05-24 11:55 清风旋叶 阅读(281) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1115思路:转换为求三角形的重心。从第一个顶点出发,分别链接i,i+1形成三角形,分别求出每个三角形的面积,总面积之和为各部分之和。根据物理公式n个点的质量是mi,则重心是:X=(x1*m1+x2*m2+...xn... 阅读全文
posted @ 2014-05-24 09:58 清风旋叶 阅读(879) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1088 1 // 典型的动态规划,用递归下的记忆化搜索来实现 2 // 状态转移方程 合法的情况下:DP(i,j) = max( DP(i,j-1), DP(i,j+1), DP(i-1,j), DP(i+1,j) ) + 1; 3 #in... 阅读全文
posted @ 2014-05-22 15:56 清风旋叶 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 转载大牛的!!!AClayton's ACM/ICPC Life 只切菜题 菜鸟乱飞 路漫漫其修远兮 我要上下左右东南西北中發白而求索ACM PKU 2244 Eeny Meeny Moo 约瑟夫问题http://acm.pku.edu.cn/JudgeOnline/problem?id=2244 ... 阅读全文
posted @ 2014-05-21 15:17 清风旋叶 阅读(562) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2602 1 #include 2 #include 3 #include 4 #define maxn 1005 5 using namespace std; 6 int n,v; 7 int f[maxn][ma... 阅读全文
posted @ 2014-05-14 13:32 清风旋叶 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 具体算法:http://hi.baidu.com/z917912363/item/a489943f63b27a5680f1a777http://acm.hdu.edu.cn/showproblem.php?pid=1269#include#include#includeusing namespace... 阅读全文
posted @ 2014-05-02 11:50 清风旋叶 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1364 1 #include 2 #include 3 #define maxn 105 4 #define INF 999999999 5 typedef struct 6 { 7 int u,v,w; 8 }node; 9 node ... 阅读全文
posted @ 2014-04-24 18:54 清风旋叶 阅读(145) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3259 1 #include 2 #include 3 #define maxn 5505 4 #define INF 9999999 5 typedef struct 6 { 7 int x,y,w; 8 }node; 9 node a... 阅读全文
posted @ 2014-04-18 19:48 清风旋叶 阅读(263) 评论(0) 推荐(0) 编辑