| ||||||||||
| 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 | |||||||||
vc6.0编译通过,提交为什么编译错误啊#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator