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

萌新一枚,请各位大佬看看怎么错了

Posted by fnoichzhe at 2018-10-05 11:57:28 on Problem 1011
如题
#include <cstdio>
int e,a[64],num,max,n,k,num1;
int main(){
	
	while(1){
		
		scanf("%d",&e);
		if(e!=0){
			
			for(int j=1;j<=e;++j){
				scanf("%d",&a[j]);
				max=a[0];num=0;
				for(int q=1;q<=e-1;++q){
					if(a[q]>max){
						max=a[q]+1;k=q;
						
					}
				}
			}
			printf("%d\n",max);
			max=0;k=0;
		}else{
			break;
		}
		
	}
	
	return 0;
	
}

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