码迷,mamicode.com
首页 >  
搜索关键字:coins    ( 511个结果
POJ1742 Coin [DP补完计划]
题目传送门 Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 41707 Accepted: 14125 Description People in Silverland use coins.They have coin ...
分类:其他好文   时间:2018-05-17 21:10:08    阅读次数:163
Lintcode394 Coins in a Line solution 题解
Lintcode394 Coins in a Line solution 题解 ...
分类:其他好文   时间:2018-04-27 12:10:47    阅读次数:145
3312. [USACO13NOV]No Change【状压DP】
Description Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1 <= K <= 16), each with value in the range ...
分类:其他好文   时间:2018-04-18 22:26:51    阅读次数:161
Spoj-COINS-记忆化dp
COINS - Bytelandian gold coins #dynamic-programming #dynamic-programming In Byteland they have a very strange monetary system. Each Bytelandian gold c ...
分类:其他好文   时间:2018-04-11 19:13:27    阅读次数:157
UVA-562 Dividing coins---01背包+平分钱币
题目链接: https://vjudge.net/problem/UVA-562 题目大意: 给定n个硬币,要求将这些硬币平分以使两个人获得的钱尽量多,求两个人分到的钱最小差值 思路: 它所给出的n个钱币加起来sum,将sum/2当作体积,求出在sum/2下的最大值,sum-2*dp[sum/2] ...
分类:其他好文   时间:2018-04-11 00:19:03    阅读次数:186
洛谷P2851 [USACO06DEC]最少的硬币The Fewest Coins(完全背包+多重背包)
题目描述 Farmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the smallest ...
分类:其他好文   时间:2018-04-10 21:56:10    阅读次数:292
最短路练习 poj1724
题目链接:http://poj.org/problem?id=1724 Input The first line of the input contains the integer K, 0 <= K <= 10000, maximum number of coins that Bob can sp ...
分类:其他好文   时间:2018-03-28 01:27:35    阅读次数:224
1048. Find Coins (25)
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou ...
分类:其他好文   时间:2018-03-27 10:21:04    阅读次数:146
抛硬币 Flipping Coins(Gym - 101606F)
Here’s a jolly and simple game: line up a row of N identical coins, all with the heads facing down onto the table and the tails upwards, and for exact ...
分类:其他好文   时间:2018-03-15 01:45:23    阅读次数:304
1048. Find Coins (25)
(1)思路暴力 会超时 (2) 用hash存储每个数被M减之后的数 注意这里会有重复的值所以要用数组存储其数量 再仔细思考一下,只要用数组存储每个数的数量即可,遍历的时候判断该数组v[M-i]元素的值是否大于1 未简化时的代码 ...
分类:其他好文   时间:2018-03-14 23:01:51    阅读次数:181
511条   上一页 1 ... 13 14 15 16 17 ... 52 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!