@[comcnSBhhh](/user/1102819) 啊
by chenletao @ 2024-07-21 19:26:10
@[comcnSBhhh](/user/1102819)
```
#include<bits/stdc++.h>
using namespace std;
int dp[105][205][205],times[205],moneys[205],n,m,t;
int main()
{
cin>>n>>m>>t;
for(int i=1;i<=n;i++)cin>>moneys[i]>>times[i];
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
for(int k=1;k<=t;k++)
{
if(j>=moneys[i]&&k>=times[i])
dp[i][j][k]=max(dp[i-1][j][k],dp[i-1][j-moneys[i]][k-times[i]]+1);
else
dp[i][j][k]=dp[i-1][j][k];
}
}
}
cout<<dp[n][m][t];
return 0;
}
```
by _liujunming_ @ 2024-08-29 16:11:17