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

谁能看看我为什么RE?没可能啊

Posted by ogogo at 2006-02-26 01:45:14 on Problem 2211
没可能啊

#include<iostream.h>
int main()
{
	int n,i,j,top,tot,t,tt,k,a[1000];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>top>>tot;t=0;
		for(j=0;j<tot;j++)cin>>a[j];
		for(j=0;j<tot;j++)
		{
			tt=a[j]-1;
			for(k=top-j-1;k>=top-tot+1;k--)tt*=k;
			t+=tt;
			for(k=j+1;k<tot;k++)if(a[k]>a[j])a[k]--;
		}
		cout<<"Variace cislo "<<i+1<<" ma poradove cislo "<<t+1<<"."<<endl;
	}
}

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