自爆魂

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

2014年10月21日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4972两支球队进行篮球比赛,每进一次球后更新比分牌,比分牌的计数方法是记录两队比分差的绝对值,每次进球的分可能是1,2,3分。给定比赛中的计分情况,问说最后比分有多少种情况。分情况讨论即可:相邻计分之差大于3或者相... 阅读全文
posted @ 2014-10-21 10:39 自爆魂 阅读(235) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1116给你一些英文单词,判断所有单词能不能连成一串,类似成语接龙的意思。但是如果有多个重复的单词时,也必须满足这样的条件才能算YES。否则都是不可能的情况。欧拉回路和欧拉通路的判定可以总结为如下:1)所有的点联通2... 阅读全文
posted @ 2014-10-21 01:03 自爆魂 阅读(152) 评论(0) 推荐(0) 编辑

2014年10月20日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5068题意给的略不清晰m个询问:从i层去j层的方法数(求连段乘积)或者修改从x层y门和x+1层z门的状态反转(更新只需更新一个节点的矩阵)直接贴题解我们可以把第i层跟第i+1层之间楼梯的通断性构造成一个2*2的通断... 阅读全文
posted @ 2014-10-20 00:12 自爆魂 阅读(201) 评论(0) 推荐(1) 编辑

2014年10月19日 #

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5067贴题解由于Harry的dig machine是无限大的,而装载石头和卸载石头是不费时间的,所以问题可以转化成:从某一点出发,遍历网格上的一些点,每个点至少访问一次需要的最小时间是多少。这就是经典的旅行商问题,... 阅读全文
posted @ 2014-10-19 21:17 自爆魂 阅读(176) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5066中学物理题#include #include #include #include #include #include #include #include #include using namespace st... 阅读全文
posted @ 2014-10-19 19:21 自爆魂 阅读(161) 评论(0) 推荐(0) 编辑

摘要: #include #include #include #include #include using namespace std;int a,b;int main(){ while(scanf("%d%d",&a,&b) != EOF) { printf("%d\n",(a... 阅读全文
posted @ 2014-10-19 19:15 自爆魂 阅读(158) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2222就是裸的多串匹配的问题,AC自动机模板题http://www.cppblog.com/MatoNo1/archive/2011/10/19/158635.html用了yang_7_46的模板#include ... 阅读全文
posted @ 2014-10-19 16:19 自爆魂 阅读(275) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3664求1~n的排列个数,使得逆序数(ai>i ) 为给定的k.dp[i][j]表示前1~i的排列中,有j个数是逆序数的个数.#include #include #include #include #include... 阅读全文
posted @ 2014-10-19 15:58 自爆魂 阅读(241) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4268A想用手里的牌尽量多地覆盖掉B手中的牌..牌有h和w问A手中的牌最多能覆盖B多少张牌iterator lower_bound( const key_type &key ): 返回一个迭代器,指向键值>= ke... 阅读全文
posted @ 2014-10-19 15:40 自爆魂 阅读(179) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4004一条线段长度为L,线段上有n个点,最多选取 m-1 个点,使得包括线段端点在内的相邻点之间的最大距离值最小。最大值最小化问题,显然二分judge每次选最远点,选出点数不超过m即可#include #inclu... 阅读全文
posted @ 2014-10-19 15:08 自爆魂 阅读(148) 评论(0) 推荐(0) 编辑

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