摘要:
#include #include using namespace std; class Solution { private: vectorp; vector> res; vectorused; public: void GetPerm(vector&nums,int Index,vector&p) { if (p.size() == 2... 阅读全文
摘要:
#include <iostream> using namespace std; const int MAXSIZE = 100; typedef struct SQlist { int arr[MAXSIZE]; int Len; } SQlist; bool Init_SQlist(SQlist &space) { memset(space.arr, 0, sizeof(space.arr)) 阅读全文
摘要:
class Solution { private int dp[];//构建一个一维数组来存储次数 public int coinChange(int[] coins, int amount) { if (coins == null || coins.length == 0 || amount == 0) { return 0; } dp=new int[amount+1]; Arrays.sor 阅读全文
摘要:
#include<bits/stdc++.h> #define ll long long using namespace std; const int maxn=1010; int c[maxn],w[maxn]; int dp[maxn]; int main(){ int n,v; cin>>n>>v; for(int i=1;i<=n;i++) cin>>c[i]; for(int i=1;i 阅读全文