题目链接
const int MAXN = 110;const int M = 210000;int tastes[MAXN], calories[MAXN];int v[MAXN];int dp[2][M];int main(){// freopen("in.txt", "r", stdin); int n, m; while (~RII(n, m)) { REP(i, n) RI(tastes[i]); REP(i, n) RI(calories[i]); REP(i, n) v[i] = tastes[i] - calories[i] * m; CLR(dp, -INF); dp[0][0] = dp[1][0] = 0; REP(i, n) { int cnt = v[i] <br> <br> <p></p>