#include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
int w[2001];//保存每个物品质量
int dp[1001][2001];//k对-->i总数
int main(){
#include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
int w[2001];//保存每个物品质量
int dp[1001][2001];//k对-->i总数
int main(){