B - Ignatius and the Princess III
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
const int N=2e2+5;
int dp[N];
int main()
{
ios::sync_with_stdio(0);
int n;
while(cin>>n)
{
for(int i=1;i<=n;i++)
dp[i]=1;
dp[0]=1;
for(int i=2;i<=n;i++)
{
for(int v=i;v<=n;v++)
{
dp[v]+=dp[v-i];
}
}
cout<<dp[n]<<endl;
}
return 0;
}