这题感觉很棒啊.
想了蛮久的.
事实上跟多重背包没什么关系,似乎只要1,2两个数,就可以构造出所有种类数量.
/* xzppp */
#include <iostream>
#include <vector>
#include <cstdio>
#include <string.h>
#include <algorithm>
#include <queue>
#include <map>
#include <string>
#include <cmath>
#include <bitset>
#include <iomanip>
using namespace std;
#define FFF freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define MP make_pair
#define PB push_back
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int,int > pii;
typedef pair<LL,LL> pll;
typedef pair<double,double > pdd;
typedef pair<double,int > pdi;
const int MAXM = 2e3+17;
const int MAXV = 2*1e3+17;
const int BIT = 15+3;
const int INF = 0x7fffffff;
const LL INFF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9+7;
const int MAXN = 1e6+17;
int a[10+17] = {1,2,3,4,5,6,7,8,9,10};
int dp[MAXN];
int main()
{
#ifndef ONLINE_JUDGE
FFF
#endif
int n;
cin>>n;
dp[0] = 1;
for (int i = 0; i < 10; ++i)
{
bool can = false;
int zt;
for (int j = 0; j <= 1e6 ; ++j)
{
if(j>=a[i])
dp[j] += dp[j-a[i]];
if(dp[j]==n)
{
zt = j;
can = true;
}
}
if(can)
{
cout<<zt<<endl;
cout<<i+1<<endl;
for (int j = 0; j <= i; ++j)
{
cout<<j+1<<endl;
}
break;
}
}
return 0;
}