摘要: http://poj.org/problem?id=2531 刚开始题意理解错了,看题解也没看懂。 The traffic data are given in the form of matrix C, where Cij is the amount of data sent between ith 阅读全文
posted @ 2016-08-02 17:13 Crazy、baby 阅读(308) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3009 题意:给定一个m*n的网格,在这些网格上一些地方有障碍物,给定起点与终点的位置,当石头从起点开始走,撞上障碍才会转弯,否则会一直沿着来时的方向继续前进。撞到障碍后停在障碍前的位置,障碍消失。然后石头可以选择四个方向(相邻处无障碍的方向)前 阅读全文
posted @ 2016-08-01 20:12 Crazy、baby 阅读(161) 评论(0) 推荐(0) 编辑
摘要: POJ2488 http://poj.org/problem?id=2488 注意字典序。 阅读全文
posted @ 2016-07-28 15:24 Crazy、baby 阅读(279) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/group/5pcxnzwAHv/contest/140/problem/A A. New Year Table time limit per test 2 seconds memory limit per test 256 megabytes input 阅读全文
posted @ 2016-07-27 15:35 Crazy、baby 阅读(303) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2717 将每种状态加入到队列中,注意边界条件,n<0&&n>100000 注意N可以比K小,开始没注意,无限wa,还是太菜了啊。。。 阅读全文
posted @ 2016-07-26 21:34 Crazy、baby 阅读(277) 评论(0) 推荐(0) 编辑
摘要: HDU1372 http://acm.hdu.edu.cn/showproblem.php?pid=1372 模板 阅读全文
posted @ 2016-07-26 18:32 Crazy、baby 阅读(343) 评论(0) 推荐(0) 编辑
摘要: Christmas is coming and everyone is building a Christmas tree, and you are no exception. However you are special and you want to build a special one.  阅读全文
posted @ 2016-07-25 21:06 Crazy、baby 阅读(403) 评论(0) 推荐(0) 编辑
摘要: A sequence of positive rational numbers is defined as follows:An infinite full binary tree labeled by positive rational numbers is defined by: The la 阅读全文
posted @ 2016-07-25 19:26 Crazy、baby 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目。例如euler(8)=4,因为1,3,5,7均和8互质。 Euler函数表达通式:euler(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…(1-1/pn),其中p1,p2……pn为x的所有素因数,x是不为0的整 阅读全文
posted @ 2016-07-25 14:39 Crazy、baby 阅读(270) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/problemset/problem/362/C 1 #include <stdio.h> 2 #include <string.h> 3 #include <algorithm> 4 using namespace std; 5 const int ma 阅读全文
posted @ 2016-07-22 19:34 Crazy、baby 阅读(177) 评论(0) 推荐(0) 编辑