- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 hdu_5676_ztr loves lucky numbers
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5676 在这%一下安神,用了我没见过的黑科技next_permutation,至少我是今天才知道的#include #include #include #include #include #include #include #include #include #include #define cl(a
2016-04-30 23:25:09 232
原创 hdu_2608_0 or 1_数论
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2608 反正我是没找出这个规律的,规律参考的别人的!/* 分析:假设数n=2^k*p1^s1*p2^s2*p3^s3*...*pi^si;//k,s1...si>=0,p1..pi为n的素因子 所以T[n]=(2^0+2^1+...+2^k)*(p1^0+p1^1+...+p1^s1)*...*(p
2016-04-30 16:59:35 621
原创 hdu_2717_Catch That Cow_bfs
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2717 题解:一维简单BFS,详细看代码,0ms。#include #include using namespace std; const int maxn=100002; bool v[maxn]; int n,k; struct nd{ int x,step; }; bool check(int
2016-04-30 16:12:04 287
转载 完全大数(高精度)模版
#include #include #include #include using namespace std; /* * 完全大数模板 * 输入cin>>a * 输出a.print(); * 注意这个输入不能自动去掉前导0的,可以先读入到char数组,去掉前导0,再用构造函数。 */ #define MAXN 9999 #define MAXSIZE 1010 //输
2016-04-29 20:34:34 378
原创 HDU_1245_Saving James Bond_最短路
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1245 题意:给一个已知直径的圆形岛,然后岛的附近是湖,湖里有一些点,以坐标的形式给出,最外层是矩形的终点。 给定跳跃的距离d,让你判断是否能跳到最外层,如果能就输出最短距离以及这个最短跳的步数。 题解: 这题重点在建图,在松弛操作那里也要修改一下。详细看代码。 #include
2016-04-29 20:15:25 342
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人