// 给定一个set字符和一个正数k,找出所有该做set它可以由长度构成k该字符串集合 /* Input: set[] = {'a', 'b'}, k = 3 Output: aaa aab aba abb baa bab bba bbb Input: set[] = {'a', 'b', 'c', 'd'}, k = 1 Output: a b c d package recursion; import java.util.ArrayList; public class N_sets_form…
首先对于这个题目背景,,个人认为很(you)好(qu),,, 核心就是一个裸的二维费用背包,刚刚学习的同学参见dd大牛的背包九讲 #include <cstdio> #include <cstring> #include <algorithm> int n, m, t; ][]; int mi, ti; int main () { scanf("%d %d %d", &n, &m, &t); ; i <= n; i++)…
HDU_2159 二维费用背包问题 http://acm.hdu.edu.cn/showproblem.php?pid=2159 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define INF 1e8 int dp[110][110]; int w[110]; int v[110]; int main() { int n,m,k,s; while(~scanf…