| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
谁能看看我为什么RE?没可能啊没可能啊
#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator