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 |
你输出什么东西啊???????In Reply To:为什么总是WA呢?HELP! Posted by:novice at 2005-08-14 17:22:58 > #include<iostream.h> > #include<stdio.h> > int main() > { > int i,j,n,a[1010]; > double s[1010]={0},max; > cin>>n; > for(i=1;i<=n;i++) > cin>>a[i]; > s[1]=1;max=0; > for(i=2;i<=n;i++) > for(j=1;j<i;j++) > if(s[j]+1>s[i]&&a[j]<a[i]) > s[i]=s[j]+1; > for(i=1;i<=n;i++) > cout<<s[i]<<" "; > return 0; > } > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator