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

vc6.0编译通过,提交为什么编译错误啊

Posted by Raymond2011 at 2011-04-18 11:02:25 on Problem 2533
#include <iostream>
#include <cstdio>

#define MAX 1100

using namespace std;

int main()
{
	int a[MAX];
	int temp[MAX];
	int N;
	int j;
	cin>>N;
	for(int i=1;i<=N;i++)
		cin>>a[i];
	 for(i=1;i<=N;i++)
	 {
		temp[i]=1;	 
	 }
	 for(i=1;i<N;i++)
	 {
		 for(j=i+1;j<=N;j++)
		 {
			if(a[i]<a[j])
			{	
				if(temp[j]<temp[i]+1)
					temp[j]=temp[i]+1;
			}
		}
	 }
	cout<<temp[N]<<endl;
	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