为什么会Runtime Error?谢谢!!!!!!!
#include<iostream>
using namespace std;
int main()
{
 int n,j,i,sum,a[10000];
 cin>>n;
 sum=0;
 for (i=0;i<n;i++) cin>>a[i];
 for (i=0;i<n;i++)
  for (j=i+1;j<n;j++)
   {
     if (a[i]<a[j])
        {
          if (a[i]+a[j]>sum) sum=a[i]+a[j];
        }
   }
 cout<<sum;
 return 0;
}
n=1000000
© 2015 HUST ACMICPC TEAM. All Right Reserved.