#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define OB (bitset<32>) #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define ALLOF(c) begin(), (c),end() typedef long long ll; #define PI acos(-1) #define EPS 0.000000001 #define MOD 1000000007 int main() { int dp[10001][101]; int c; int n; int a[100]; cin >>c >> n; fill(a,a+100,-1);//invalid error on sort fill(*dp,*dp +10001*101, MOD);//invalid num mod? dekai rep(i,n) { cin >> a[i]; } sort(a,a+100,greater()); dp[0][0] = 0; rep(i,n) { rep(j,c+1) { if (j