文章
17
粉丝
133
获赞
4
访问
93.2k
#include<iostream>
#include<vector>
using namespace std;
int main(){
int S;
int n;
cin >> S;
cin >> n;
vector<int> a;
for(int i = 0; i < n; i++){
int temp;
cin >> temp;
a.push_back(temp);
}
vector<vector<bool>> dp(S+1, vector<bool>(n+1, false));
for(int i = 0; i <= n; i++){
dp[0][i] = true;
}
for(int i = 1; i <= S; i++){
for(int j = 1; j <= n; j++){
if(i >= a[j-1]){
&nbs...
登录后发布评论
暂无评论,来抢沙发