自爆魂

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页

2014年10月19日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2544直接搞存份模板http://blog.csdn.net/niushuai666/article/details/7292722#include #include #include #include #incl... 阅读全文
posted @ 2014-10-19 14:58 自爆魂 阅读(124) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1711判断b是不是a字串,输出b在a位置下标kmp模板题#include #include #include #include #include #include #include #include #includ... 阅读全文
posted @ 2014-10-19 14:51 自爆魂 阅读(112) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2063男女配对最大数匈牙利算法模板#include #include #include #include #include #include #include #include #include using nam... 阅读全文
posted @ 2014-10-19 14:22 自爆魂 阅读(149) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1348造城墙问题,求出凸包加上一圈圆的周长即可凸包模板题#include #include #include #include #include #include #include #include #includ... 阅读全文
posted @ 2014-10-19 13:57 自爆魂 阅读(121) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4950给定怪兽血量h,你攻击力a,怪物回血力b,你攻击k次要休息一次,问能否杀死怪兽特判一次打死怪兽的情况和第k次前打死怪兽的情况,否则只要能磨死怪兽即可#include #include #include #in... 阅读全文
posted @ 2014-10-19 11:24 自爆魂 阅读(187) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4952给定x,k,i从1到k,每次a[i]要是i的倍数,并且a[i]大于等于a[i-1],x为a0递推到下一个a==之前的a即可跳出循环#include #include #include #include #in... 阅读全文
posted @ 2014-10-19 11:11 自爆魂 阅读(188) 评论(0) 推荐(0) 编辑

2014年10月18日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4957拿n只破的木桶去接水,每只木桶漏水速度为a[i],最后要得到b[i]单位的水,自来水的出水速度为V,木桶里只要有水就会漏水,每次只能接一只木桶。问最短需要多少时间,每只木桶里的水为b[i]ans+=(p[i]... 阅读全文
posted @ 2014-10-18 23:50 自爆魂 阅读(174) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4983求有多少对元组满足题目中的公式。对于K=1的情况,等价于gcd(A, N) * gcd(B, N) = N,我们枚举 gcd(A, N) = g,那么gcd(B, N) = N / g。问题转化为统计满足 g... 阅读全文
posted @ 2014-10-18 23:40 自爆魂 阅读(149) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4982给定n和k,求一个包含k个不相同正整数的集合,要求元素之和为n,并且其中k-1的元素的和为完全平方数枚举平方数,从1开始构造余下序列(贪心),需要特判最后剩下的一个数是否在之前的序列或者和n-m*m相同,然后... 阅读全文
posted @ 2014-10-18 22:55 自爆魂 阅读(190) 评论(0) 推荐(0) 编辑

摘要: 中位数是否大于平均数水题#include #include #include #include #include #include #include #include #include using namespace std;#define RD(x) scanf("%d",&x)#define R... 阅读全文
posted @ 2014-10-18 22:09 自爆魂 阅读(135) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页