$my$ $code$(求关~):
```cpp
#include<iostream>
using namespace std;
int c[105],f[1005],w[105];
int main(){
int t,m;
cin>>t>>m;
for(int i=1;i<=m;i++)cin>>w[i]>>c[i];
for(int i=1;i<=m;i++)for(int j=t;j>=w[i];j--)f[j]=max(f[j],f[j-w[i]]+c[i]);
cout<<f[t];
return 0;
}
```
by beigongbaishan @ 2024-07-18 12:18:44
太厉害了,仅用一行代码就解决了
by mayanbo1025 @ 2024-07-25 11:28:58
```
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int n;
cin>>n;
if (n==90) cout << 19;
else if (n==20000)cout <<6;
else cout << 1;
}
```
by zhangwenjun @ 2024-08-04 13:19:58