码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
ZOJ 3866 Cylinder Candy
Cylinder CandyTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeEdward the confectioner is making a new batch of chocolate covered candy. Each c...
分类:其他好文   时间:2015-04-13 18:08:28    阅读次数:287
ZOJ 3868 GCD Expectation DP
dp[i] 表示公约数为i时有多少种组合 先预处理一遍dp[i]这是的dp[i]表示含有公约数i或者i的倍数的组合有多少个 再倒着dp dp[i] - = Sigma(dp[j]) (j是i的倍数 2i,3i,4i.....) 结果既为 Sigma[ dp[i]*pow(i,k) ] GCD Expectation Time Limit: 4 Seconds   ...
分类:其他好文   时间:2015-04-13 12:57:48    阅读次数:128
[水题+dfs] zoj 3861 Valid Pattern Lock
题意: 给n个不同的整数(3 输出方案数,以及按字典序输出每种方案。 思路: 一个很水的dfs全排列,加上特判就好了。 特判就是1->9的话就必定经过5等。 这里要注意的是。 中间所经过的数字是必须存在的。 比如要想1->9就必须有5. 5要么被用过,要么就经过5 例子就是 1 3 5 9这四个数。 实际的方案是只有2种 3 5 1 9 和 3 5 9 1 然后就是输入完...
分类:其他好文   时间:2015-04-13 12:56:19    阅读次数:135
[bfs] zoj 3865 Superbot
题意: 给一个n*m的图。 '@'代表你的位置,'.'代表空地,'*'代表墙,'$'代表钻石。 在每一秒钟你有四种选择。 1、站着不动。 2、光标往左移动一格。 3、光标往右移动一格。 4、点击光标让自己按光标的方向移动一格。 然后题目还给了一个k,代表每k秒光标整体循环右移一格。 现在问你拿到钻石的最少步数。 思路: 本弱开了一个四维数组判重use[x][y][f][l] ...
分类:其他好文   时间:2015-04-13 12:56:05    阅读次数:148
[暴力统计] zoj 3868 GCD Expectation
题意: 给n和k,求n个数的任意非空子集gcd的k次方的期望。 最后期望乘上2^n-1 思路: 因为取每个子集都是等概率,所以取出每个子集的概率是1/(2^n-1) 然而最后的答案是乘上2^n-1 所以其实求的就是每个非空子集的gcd的k次方的和。 然后就是求法了。 我们可以把题目转换成求gcd等于i的非空集合有多少个。 gcd从Max枚举到1,求出答案。 对于每个i,设n个数...
分类:其他好文   时间:2015-04-13 12:55:04    阅读次数:115
ZOJ 3861 Valid Pattern Lock
不服啊。...
分类:其他好文   时间:2015-04-13 09:36:47    阅读次数:129
ZOJ 3866 Cylinder Candy
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5478 题面: Cylinder Candy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Edward the confectioner is ...
分类:其他好文   时间:2015-04-13 09:36:42    阅读次数:150
ZOJ3864:Quiz for EXO-L(BFS)
Exo (Korean: ??; Chinese:爱咳嗽; often stylized as EXO) is a Chinese-South Korean boy band based in Seoul, South Korea. Formed by SM Entertainment in 2011, the group consists of twelve members separate...
分类:其他好文   时间:2015-04-13 00:29:26    阅读次数:418
ZOJ3865:Superbot(BFS)
Superbot is an interesting game which you need to control the robot on an N*M grid map. As you see, it's just a simple game: there is a control panel with four direction left (1st position), right ...
分类:其他好文   时间:2015-04-13 00:28:23    阅读次数:171
ZOJ3867:Earthstone: Easy Version
Earthstone is a famous online card game created by Lizard Entertainment. It is a collectible card game that revolves around turn-based matches between two opponents. Players start the game with a su...
分类:其他好文   时间:2015-04-12 22:46:45    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!