自爆魂

博客园 首页 新随笔 联系 订阅 管理

2014年10月13日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5036n个房间每个房间里面有一把或多把钥匙可以打开其他的门。如果手上没有钥匙可以选择等概率随机选择一个门炸开,求用炸弹数的期望。O(N^3)的复杂度过不了单独考虑一个房间,如果有k个房间被炸开都会导致这个房间被打开... 阅读全文
posted @ 2014-10-13 22:35 自爆魂 阅读(296) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5037有只青蛙踩石子过河,河宽m,有n个石子坐标已知。青蛙每次最多跳L。现在可以在河中再放一些石子,使得青蛙过河跳的次数最多。青蛙是贪心的,如果它现在在cur位置跳不动了,且它上一次所在位置为pre。那么God肯定... 阅读全文
posted @ 2014-10-13 22:32 自爆魂 阅读(131) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5038模拟水题求出现次数最多的grade。如果有多个grade出现的次数一样多,且还有其他的grade,则把这些出现次数最多的grade按升序输出;否则,输出“Bad Mushroom”。#include #inc... 阅读全文
posted @ 2014-10-13 22:28 自爆魂 阅读(152) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5040一个人拿着纸盒子往目的地走 正常情况下一秒走一格 可以原地不动躲在盒子里 也可以套着盒子三秒走一格 地图上有些灯 灯能照到自己和面前一个格 每一秒灯顺时针转90度 如果要从灯照的地方离开或者进入灯照的地方就必... 阅读全文
posted @ 2014-10-13 22:25 自爆魂 阅读(142) 评论(0) 推荐(1) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5045给出N个人做M道题的正确率,每道题只能由一个人做出,并且当所有人都做出来且仅做出一道题时,做过题的人才可以继续做题,求最大期望。n最大值是10,想到用状压状压dp#include #include #incl... 阅读全文
posted @ 2014-10-13 22:24 自爆魂 阅读(110) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5046n城市建k机场使得,是每个城市最近机场的距离的最大值最小化二分+DLX模板题#include #include #include #include #include #include #include #in... 阅读全文
posted @ 2014-10-13 22:21 自爆魂 阅读(209) 评论(0) 推荐(1) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5047找规律信kuangbin,能AC#include #include #include #include #include #include #include #include #include #includ... 阅读全文
posted @ 2014-10-13 22:17 自爆魂 阅读(118) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5050大数模板最大公约数信kuangbin,能AC#include #include #include #include #include #include #include #include #include u... 阅读全文
posted @ 2014-10-13 22:11 自爆魂 阅读(153) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5051打表找规律据说是http://zh.wikipedia.org/wiki/%E6%9C%AC%E7%A6%8F%E7%89%B9%E5%AE%9A%E5%BE%8B蛋疼题还要特判4种情况顺道膜拜昂神#incl... 阅读全文
posted @ 2014-10-13 21:59 自爆魂 阅读(166) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5055n个digit能组合出的最大无前导0奇数无聊的模拟#include #include #include #include #include #include #include #include#include... 阅读全文
posted @ 2014-10-13 21:56 自爆魂 阅读(120) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5054确定是否矩形中点这都能hack成功,无语#include #include #include #include #include #include #include #include#include #inc... 阅读全文
posted @ 2014-10-13 21:56 自爆魂 阅读(93) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5058set应用水题#include #include #include #include #include #include #include #include #include using namespace ... 阅读全文
posted @ 2014-10-13 21:45 自爆魂 阅读(140) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5056所有字母个数都不超过k的字串数目比赛时候用模拟+组合数学过的,是O(2*26*N)的复杂度,但是没有正解快遍历每个恰好符合条件的[i,j],其中若包含[i,jj]其中jj是上次计数的最远的j,就+一次i~j ... 阅读全文
posted @ 2014-10-13 21:44 自爆魂 阅读(111) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5059确定输入的数是否在(a,b)内简单字符串处理#include #include #include #include #include #include #include #include #include u... 阅读全文
posted @ 2014-10-13 21:40 自爆魂 阅读(135) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5060官方题解http://bestcoder.hdu.edu.cn/给复杂了实际上用圆柱体与球体体积差的积分公式(pi*r*r - pi*x*x)即可轻松解决五种情况#include #include #incl... 阅读全文
posted @ 2014-10-13 21:35 自爆魂 阅读(210) 评论(0) 推荐(0) 编辑