| ||||||||||
| 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 | |||||||||
一个16行的程序 没有用指针 没有用除法 没有用函数 更没有用文件 怎么可能re?!!?!!?!?帮我题是2211
自己运行数据都没问题
一提交就RE 开什么国际玩笑。。
#include<iostream.h>
int main()
{
int n,i,j,top,tot,t,ans[100],ansn(0),k,a[100];
double tt;
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]--;
}
ans[ansn]=t+1;ansn++;
}
for(i=0;i<ansn;i++)cout<<"Variace cislo "<<i+1<<" ma poradove cislo "<<ans[i]<<"."<<endl;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator