- 博客(47)
- 资源 (1)
- 收藏
- 关注
原创 HDU 5318 The Goddess Of The Moon(矩阵快速幂详解)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5318题面:The Goddess Of The MoonTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 800
2015-07-31 13:36:07 1839
原创 HDU 5336 XYZ and Drops (模拟+搜索,详解)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5336题面:XYZ and DropsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 725 Accept
2015-07-31 13:20:50 1060
原创 ZOJ 3890 Wumpus (2015年7月浙大月赛、广搜)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5560题面:WumpusTime Limit: 2 Seconds Memory Limit: 65536 KB One day Leon finds a very classic game called Wumpu
2015-07-27 19:42:50 1199
原创 HDU 4431 Mahjong (麻将、神坑模拟题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4431题面:MahjongTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4219 Accepted Subm
2015-07-27 18:32:08 2796
原创 HDU 5074 Hatsune Miku (动态规划)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5074题面:Hatsune MikuTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 810 Accepte
2015-07-27 13:30:10 1021
原创 HDU 4800 Josephina and RPG(动态规划)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4800题面:Josephina and RPGTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1077 Acc
2015-07-27 11:38:57 1336
原创 HDU 5301 Buildings(思维)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5301题面:BuildingsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1421 Accepted
2015-07-25 11:25:20 971
原创 HDU 5305 Friends (深搜)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5305题面:FriendsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1149 Accepted Subm
2015-07-25 11:11:51 805
原创 HDU 4772 Zhuge Liang's Password (简单模拟题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4772题面:Zhuge Liang's PasswordTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1404
2015-07-25 11:05:25 949
原创 HDU 4771 Stealing Harry Potter's Precious (深搜+广搜)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4771题面:欢迎参加——BestCoder周年纪念赛(高质量题目+多重奖励)Stealing Harry Potter's PreciousTime Limit: 2000/1000 MS (Java/Others) Memo
2015-07-25 11:02:11 1577
原创 HDU 4801 Pocket Cube(模拟题——转魔方)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4801题面:Pocket CubeTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 882 Accepted
2015-07-25 10:53:59 2087
原创 HDU 5308 I Wanna Become A 24-Point Master
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5308题面:I Wanna Become A 24-Point MasterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submis
2015-07-24 13:55:02 1189
原创 【打CF,学算法——三星级】Codeforces Round #313 (Div. 2) C. Gerald's Hexagon
题目链接:http://codeforces.com/contest/560/problem/C题面:C. Gerald's Hexagontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandar
2015-07-23 09:38:29 1400
原创 【打CF,学算法——二星级】Codeforces Round #313 (Div. 2) B. Gerald is into Art(水题)
题目链接:http://codeforces.com/contest/560/problem/B题面:B. Gerald is into Arttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutput
2015-07-23 09:28:52 1127
原创 【打CF,学算法——一星级】Codeforces Round #313 (Div. 2) A. Currency System in Geraldion
题目链接:http://codeforces.com/contest/560/problem/A题面:A. Currency System in Geraldiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard input
2015-07-23 09:24:37 1199
原创 HDU 5289 Assignment (ST算法区间最值+二分)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5289题面:AssignmentTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 672 Accepted Su
2015-07-22 10:55:40 1288
原创 HDU 5288 OO‘s sequence (技巧)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5288题面:OO’s SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 985 Accept
2015-07-22 10:20:15 1195
转载 ST算法(Sparse Table)
转自飘过的小牛:http://blog.csdn.net/niushuai666/article/details/66246721. 概述RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j当然,该问题也可以用线段树(也叫区间树)解决,算法复杂度为:O(N)~O
2015-07-21 19:15:52 3418
原创 计蒜客 31 工作区的颜值选择(简单)
题目链接:http://nanti.jisuanke.com/t/431题面:360硅谷范的工作区被划为了 n 行 m 列的连续工位,每个工位上可以安排一名员工工作。当第 i 行第 j 列(行和列都从1开始编号)的工位中坐着一个颜值为 C 的员工时,公司会需要付出的成本是 (|C + i + j| ⊕ U) * W(其中⊕是按位异或符号)。U 是这个工位的风水指数,W 是这个工位上接收
2015-07-19 09:36:52 1168
原创 HDU 5115 Dire Wolf(区间dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5115题面:Dire WolfTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 687 Accepted
2015-07-16 22:54:31 1042
原创 HDU 5113 Black And White(DFS+剪枝)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5113题面:Black And WhiteTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1336 A
2015-07-16 19:38:36 989
原创 HDU 4791 Alice's Print Service
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4791题面:Alice's Print ServiceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1596 Acc
2015-07-16 19:13:23 1386
转载 背包九讲(转载)
收藏下,开始慢慢消化咯!!(转载自http://blog.csdn.net/sky_fighting/article/details/8789067)目录第一讲 01背包问题这是最基本的背包问题,每个物品最多只能放一次。第二讲 完全背包问题第二个基本的背包问题模型,每种物品可以放无限多次。第三讲 多重背包问题每种物品有一个固定的次数上限。第四讲 混合三种背包
2015-07-16 18:31:02 685
原创 HDU 4790 Just Random
题目链接:Just Random题面:Just RandomTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2085 Accepted Submission(s): 584Problem Des
2015-07-16 10:15:04 882
原创 HDU 4788 Hard Disk Drive
题目链接:HDU 4788 Hard Disk Drive 题面:Hard Disk DriveTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1872 Accepted Submission(s): 10
2015-07-15 19:24:59 1053
原创 UVALive 6859 Points (凸包)
题意: 用周长最短的多边形将给定的点都包含到多边形内。给定的都是整数点,要求多边形的顶点也为整数点,且最小单位只能为1或根号2,即为单元格边长或单元格斜线。一开始,就觉得是凸包,但想得是把给定的点求一次凸包,再把凸包上的点的周围上下左右四个点构成的集合求个凸包。然而正确的解法是将所有的点的周围四个点构成的集合去重后,求凸包。得到解法后,想想还是有道理的。求出凸包的点后,用下式计算即可。x
2015-07-15 13:08:25 1035 2
原创 UVALive 6858 Frame
题意: 问能否用A*1的砖铺好长宽分别为X,Y的外一层。其实就是顶角上四块砖属于这一行还是这一列的问题。直接枚举所有情况,有一种都能整除即可。代码:#include #include #include #include #include using namespace std;int main(){ int x,y,a,n,b,c,d,e;
2015-07-15 13:00:36 1116
原创 【打CF,学算法——二星级】Codeforces Round #312 (Div. 2) B. Amr and The Large Array
题目链接:B. Amr and The Large Array题面:B. Amr and The Large Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard out
2015-07-15 10:55:54 1057
原创 【打CF,学算法——二星级】Codeforces Round #312 (Div. 2) A Lala Land and Apple Trees
题目链接:A. Lala Land and Apple Trees题面:A. Lala Land and Apple Treestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard
2015-07-15 10:48:51 1430
原创 UVALive 6953 Digi Comp II(搜索)
题意: m个开关,n个球。每个开关有两个状态,左或右,左则滚到左边,右则滚到右边。每滚一个球状态则反转一次。问最后每个开关的状态是怎样的。解题: 因为球数实在太多(10^18),一个一个模拟果断不行,而开关的最后状态只取决于滚过的球数和初始状态。故我决定n个球一起传,然而,因为有些节点可能后面才扫到,而它的子节点已经把球传下去了,没考虑到这一点,wa了一次。改了之后,因为
2015-07-13 22:32:56 1266
原创 UVALive 6955 Finding Lines
题意: 问能否在给定的图中,找到足够多的点使其落在一条直线上,这些点的数量除以总数量大于等于给定的概率。解题: 是看了别人的做法后,才知道这么做的。随机取2个点,然后判断所有点是否落在直线上,若落在直线上的比例大于等于给定概率则停止,否则继续循环,直至10000次(貌似1000也就够了。)若循环10000次后仍未找到大于概率的情况则输出impossible。(注意特殊
2015-07-13 22:24:26 1432
原创 UVALive 6832 Bit String Reordering
题意: 给定两种类型字符串,第一个是直接0,1表示的,第二个是用字符数表示,相邻两个间,字符为0或1,求通过交换相邻两个字符,最少用几次,将字符串1变到字符串2。解题: 首先先确定字符串2的序列,若字符串1中字符1和字符0的数量相同,那么字符串2,可以取两种状态,在两种状态中取少的那种,否则就只有一种,直接计算即可。 如何计算步数? 字符串向后移
2015-07-13 22:14:09 1264
原创 UVALive 6959 签到(水题)
题意:问两组字符串,最多有多少组相同。解题:可以直接用map映射一下,很方便但是速度不快。队友是用c串读入,排个序,然后扫一遍,速度快很多。代码:#include #include #include #include #include #include using namespace std;int main(){ int n,ans=0; s
2015-07-13 22:12:15 927
原创 UVALive 6957 Hyacinth(读题)
解题: 感觉自己读题能力太差,读了好几遍才读懂。题意是指每个节点有两个频率,而题目给出的边代表这两个节点联通,这两个节点联通,则他们必须有一个相同的频率,现求一方案可以使得联通边用的频率数最多。那么,就是能用新值就用新值,若某个节点两个频率都有了,则取其中一个,赋值给另外一个节点的一个频率即可。最后把,仍未填的频率,填一下就好。代码:#include #include
2015-07-13 13:25:47 1218
原创 UVA 10491 Cow and Cars
解题: 简单的概率题,选中车的概率为先选中牛的概率乘以车的数量/(仍可选牛的数量+车的数量)+先选中车的概率乘以(车的数量-1)/(仍可选的牛的数量+车的数量-1)。代码:#include #include using namespace std;int main(){ int cow,car,show; while(cin>>cow>>car>>show) {
2015-07-13 13:19:46 788
原创 UVA 11892 ENimEN (简单博弈)
题面:11892 ENimEN In deterministic games no chance is involved, meaning that the final result can be predicted from theinitial arrangement a
2015-07-12 09:57:58 1350
原创 UVA 12293 Box Game(博弈入门)
题目链接:Box Game题面: 12293 Box GameThere are two identical boxes. One of them contains n balls, while the other box contains one
2015-07-09 22:58:05 1005
原创 ZOJ 3864 Quiz for EXO-L
题目链接:Quiz for EXO-L题面:B - Quiz for EXO-LTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3864DescriptionExo (Korea
2015-07-09 22:49:07 1448
原创 HDU 5072 Coprime (单色三角形+容斥原理)
题目链接:Coprime题面:CoprimeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1181 Accepted Submission(s): 471Problem Descripti
2015-07-09 13:10:08 1344
原创 【打CF,学算法——一星级】Gym 100548A Built with Qinghuai and Ari Factor (Asia Xian)
题目链接:Built with Qinghuai and Ari Factor题面:Built with Qinghuai and Ari FactorDescriptionDISCLAIMER: All names, incidents, characters and places appearing in this problemare fictitious. An
2015-07-08 22:18:22 1413
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人