【NOIP2001】【codevs1011】数的计算

problem

solution

codes

#include<iostream>
using namespace std;
const int maxn = 1010;
int f[maxn];
int main(){
    int n;  cin>>n;
    for(int i = 1; i <= n; i++){
        f[i] = 1;
        for(int j = 0; j <= i/2; j++)f[i] += f[j];
    }
    cout<<f[n]<<"
";
    return 0;
}
原文地址:https://www.cnblogs.com/gwj1314/p/9444745.html