Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这种做法是不行的

Posted by ws200631430028 at 2009-05-27 21:59:07 on Problem 2249
#include <iostream>

const int N=100;

using namespace std;
unsigned long C[N+1][N+1];
int main()
{

    for(int i=1;i<=N;i++)
    {
            C[i][0]=1;
            C[i][i]=1;        
    }
    
    for(int i=1;i<=N-1;i++)
    for(int j=i+1;j<=N;j++)
    {

            C[j][i]=C[j-1][i-1]+C[j-1][i];       
    }
    int n,m;
    cin>>n>>m;
    while((n+m)!=0)
    {
         cout<<C[n][m]<<endl;
         cin>>n>>m;               
    }

    return 0;    
} 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator