完全背包#include#include#include#includeusing namespace std;int A[20];int dp[305];int main(){ int i,j; for(i=1;i<=17;i++) A[i]=i*i; dp[0]=1; f...
分类:
其他好文 时间:
2015-07-15 20:38:44
阅读次数:
130
Problem Description
Alice and Bob are playing a kind of special game on an N*M board (N rows, M columns). At the beginning, there are N*M coins in this board with one in each grid and every coin ma...
分类:
其他好文 时间:
2015-07-14 13:37:50
阅读次数:
135
HDU 2844 Coins (多重背包计数 空间换时间)...
分类:
其他好文 时间:
2015-07-14 00:11:11
阅读次数:
229
def make_change(amount, coins): """Return a list of coins that sum to amount, preferring the smallest coins available and placing the smallest c...
分类:
其他好文 时间:
2015-07-12 00:03:57
阅读次数:
165
Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When I....
分类:
其他好文 时间:
2015-07-11 22:50:57
阅读次数:
158
pid=1398">链接:hdu 1398题意:有17种货币,面额分别为i*i(1int main(){ int c1[305],c2[305],i,j,k,n; for(i=0;iint main(){ int a[20]={0,1,4,9,16,25,36,49,64,81,1...
分类:
其他好文 时间:
2015-07-05 22:22:31
阅读次数:
110
Description
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 number of coins changes hands, i.e., the...
分类:
其他好文 时间:
2015-06-30 18:32:13
阅读次数:
141
POJ 3210 : CoinsTime Limit: 1000MS Memory Limit: 131072K
Total Submissions: 7001 Accepted: 4616DescriptionSnoopy has three coins. One day he tossed them on a table then and tried to flip some...
分类:
其他好文 时间:
2015-06-25 15:36:15
阅读次数:
85
package yxd.sf.eightcoins;
public class EightCoins {
public static int compareTo(int[] coins, int[] left, int[] right) {
int leftTotal = 0;
int rightTotal = 0;
int fakeCoin = 0;
int coi...
分类:
编程语言 时间:
2015-06-17 23:24:49
阅读次数:
223