2013年4月1日
摘要: 题目链接。分析:不得不说,这是一道好题。dp[i][j],i代表前i个物品,j代表平衡度为j时的方法数。#include <stdio.h>#include <stdlib.h>#include <string.h>int dp[21][15002];int main(){ int n, g, i, j, k, t, c[21], w[21]; scanf("%d %d", &n, &g); for(i=1; i<=n; i++) scanf("%d", &c[i]); for(i=1; 阅读全文
posted @ 2013-04-01 11:29 Still_Raining 阅读(161) 评论(0) 推荐(0)