摘要: 递推,找规律#include <iostream> #include <cstdio> using namespace std; int count[510]; int main() { count[1]=1; int i,j; for(i=2;i<=500;i++) { int t=count[i-1]; for(j=1;j<=i;j++) t=t+i+1-j; for(j=1;i-j>=j;j++) t=t+i-j+1-j; count[i]=t; } int n; while(cin>>n) cout<<count[n]& 阅读全文
posted @ 2013-02-25 19:27 LJ_COME!!!!! 阅读(128) 评论(0) 推荐(0)