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

problem 1579 在编译软件下测试成功,但是出现PE,请问各位大侠是什么原因

Posted by 19891206 at 2010-10-11 18:44:38 on Problem 1579
#include<iostream>
using namespace std;
#define Max 21
int main()
{
    int array[Max][Max][Max]={0};
    int temp[Max]={0},temp2[Max*3]={0};
    int i,j,k,count=0,count2=0;
    for(i=0;i<21;i++)
      for(j=0;j<21;j++)
      {
        array[0][i][j]=1;
        array[i][0][j]=1;
        array[i][j][0]=1;
      }
    for(i=1;i<Max;i++)
     for(j=1;j<Max;j++)
       for(k=1;k<Max;k++)
       {
         if(i<j&&j<k) array[i][j][k]=array[i][j][k-1]+array[i][j-1][k-1]-array[i][j-1][k];
         else array[i][j][k]=array[i-1][j][k]+array[i-1][j-1][k]+array[i-1][j][k-1]-array[i-1][j-1][k-1];  
       }
    int a,b,c;
    while(cin>>a>>b>>c)
    {
      if(a==-1&&b==-1&&c==-1)
      {
        for(i=0;i<count;i++)
        cout<<"w("<<temp2[3*i] <<","<<temp2[3*i+1]<<","<<temp2[3*i+2]<<") = "<<temp[i]<<endl;
        break;
      }
      if(a<=0||b<=0||c<=0)
      {
      temp[count++]=array[0][0][0];
      temp2[count2++]=a;
      temp2[count2++]=b;
      temp2[count2++]=c;
      }
      else if(a>20||b>20||c>20)
      {
      temp[count++]=array[20][20][20];
      temp2[count2++]=a;
      temp2[count2++]=b;
      temp2[count2++]=c;
      }
      else
      {
      temp[count++]=array[a][b][c];
      temp2[count2++]=a;
      temp2[count2++]=b;
      temp2[count2++]=c;
      }
    }
    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