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:求帮忙:为什么会wa?In Reply To:求帮忙:为什么会wa? Posted by:2010014429 at 2011-10-06 11:35:59 > #include<stdio.h> > int main(){ > int n,sum,k,i; > long x[100001]; > while(scanf("%d",&n)!=EOF){ > if(n == 0){ > sum = 0; > } > else{ > sum =1; > k = 1; > scanf("%ld",&x[0]); > for(i = 1;i<n;i++){ > scanf("%ld",&x[i]); > if(x[i]>x[i-1]){ > k++; > } > else if(x[i] == x[i-1]){ > continue; > } > else{ > k = 1; > } > if(sum<k){ > sum = k; > } > } > } > printf("%d\n",sum); > } > > } 显然是错的 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator