#include<stdio.h>
#include<iostream>
using namespace std;
int a[600];
int set(int n)
{
long s = 1;
for(int i= 1;i<=n/2;i++)
{
s += set(i);
if( ( i>10) && (2*(i/10) <= i%10) )
s -= a[i/10];
}
a[n] = s;
return s ;
}
int main()
{
int n ;
a[1] = 1 ;
freopen("input.txt","r",stdin);
cin>>n;
freopen("output.txt","w",stdout);
cout<<set(n)<<endl;
return 0;
}
半数单集问题
最新推荐文章于 2021-09-27 20:46:57 发布