Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <stdio.h>#include <algorithm>#include <vector>#include <math.h>#include <string.h>using namespace std;typedef long long LL;const int N = 2e5 + 5;const int M = 1e6 + 5;const int mod = 1e9 + 7;const int INf = 0x3f3f3f3f;int n, m, a[105], dp[105][105][4000];int main(){//freopen("in.txt", "r", stdin);//1-1200, 1201-3200scanf("%d%d", &n, &m);int st = n * 12 + 1, tt = st + n * 29;int sum2 = 0, sum5 = 0;for(int i = 0; i <= n; i++)for(int j = 0; j <= m; j++)for(int k = 1; k <= tt; k++)dp[i][j][k] = -INf;memset(dp, -INf, sizeof(dp));dp[0][0][st] = 0;for(int i = 1; i <= n; i++) {scanf("%d" ,&a[i]);int num2 = 0, num5 = 0;while(a[i] % 2 == 0) {