题目链接:
1 #include2 #include 3 #include 4 using namespace std; 5 const int maxn=10010; 6 const int inf=0x3f3f3f3f; 7 int dp[maxn]; 8 int sw,sv; 9 int n;10 struct node11 {12 int w,v;13 }p[maxn];14 15 int main()16 {17 int t;18 scanf("%d",&t);19 while(t--)20 {21 scanf("%d%d",&sw,&sv);22 sv-=sw;23 scanf("%d",&n);24 for(int i=0;i