码迷,mamicode.com
首页 >  
搜索关键字:coins    ( 511个结果
HDU1398 Square Coins
Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all ...
分类:其他好文   时间:2016-05-02 22:38:55    阅读次数:186
leetcode 322. Coin Change
传送门 322. Coin Change My Submissions QuestionEditorial Solution Total Accepted: 20289 Total Submissions: 81565 Difficulty: Medium You are given coins o ...
分类:其他好文   时间:2016-05-01 16:02:25    阅读次数:327
POJ 1742 Coins
题目:Coins 链接:http://poj.org/problem?id=1742 题意:给你n 种硬币,每一种的价值Ai ,每一种的数量Ci ,问你用这n 枚硬币可以凑成1-m 中的多少值,输出数量。(n<=100,m<=10万,1<=Ai<=10万,1<=Ci<=1000) 思路:如果用普通的 ...
分类:其他好文   时间:2016-04-30 12:43:33    阅读次数:200
HDU 2844 二进制优化的多重背包
Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11596 Accepted Submission(s): 4634 Problem ...
分类:其他好文   时间:2016-04-30 01:02:11    阅读次数:306
poj 1742 Coins
...
分类:其他好文   时间:2016-04-28 14:10:21    阅读次数:138
UVA, 562 Dividing coins
题意:给你n组数据,每组数据首先输入一个m,代表m个硬币的值,求将这些硬币分为俩堆,俩堆硬币值差值最小 …………ps:最开始一头雾水……然后看到了某位大神说这是背包问题,结果曲解了大神的意思,捣鼓了半天错误代码,最后仔细看了看大神的代码,然后,就没有然后了 (╯‵□′)╯︵┻━┻ 思路:动态规划,子 ...
分类:其他好文   时间:2016-04-26 19:06:33    阅读次数:107
POJ_1742_Coins
描述 给出n中硬币,分别为a[1],a[2],...,a[n],各有c[1],c[2],...,c[n]个,问能组成的面额x(x<=m)有多少. 分析 图文详解: 用f[j]表示在第i次循环时,用前i-1中硬币组成面额j,第i-1中硬币还剩多少个,如果不能组成面额j,则f[j]=-1. 最后统计f[ ...
分类:其他好文   时间:2016-04-24 23:09:22    阅读次数:229
HDOJ 1393 Weird Clock(明白题意就简单了)
Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won’t move until a special coin is thrown into its box. There are different kinds of coins as your options. However onc...
分类:其他好文   时间:2016-04-11 01:56:24    阅读次数:159
queue/prioity_queue
queue/prioity_queue uva,144 1-25个学生,每人每年领40美元。一个防盗的atm机按照1.2...k的方式依次吐出硬币。 例如:第一次吐出1coin,第二次吐出2 coins 直到限制k。然后循环从1开始吐。学生插卡取钱,当达到限额就离开队列。 注意:只有当output ...
分类:其他好文   时间:2016-04-09 19:01:06    阅读次数:290
LeetCode Coin Change
原题链接在这里:https://leetcode.com/problems/coin-change/ 题目: You are given coins of different denominations and a total amount of money amount. Write a func ...
分类:其他好文   时间:2016-04-03 13:02:09    阅读次数:144
511条   上一页 1 ... 27 28 29 30 31 ... 52 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!