답안 #554

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
554 2013-02-28T13:01:54 Z jwvg0425 올림픽 피자 (tutorial5) C++
컴파일 오류
0 ms 0 KB
#include "grader.h"
int ordernum, a[100000][8],b[8];
int cmd_counter = 0;

void Init()
{
  ordernum=0;
}

void Delivery(int I)
{
  int i,j,t=0;
  b[I]++;
  for(i=0;i<ordernum;i++)
  {
    for(j=0;j<8;j++)
    {
      t=0;
      if(b[j]<a[i][j])
        break;
      t=1;
    }
    if(t)
    {
      Bake(i);
      for(j=0;j<8;j++)
      {
        b[j]-=a[i][j];
      }
    }
  }
}

void Order(int N, int* A)
{
  int i,j,t;
  for(i=0;i<N;i++)
  {
    a[ordernum][A[i]]=1;
  }
  ordernum++;
  for(i=0;i<ordernum;i++)
  {
    for(j=0;j<8;j++)
    {
      t=0;
      if(b[j]<a[i][j])
        break;
      t=1;
    }
    if(t)
    {
      Bake(i);
      for(j=0;j<8;j++)
      {
        b[j]-=a[i][j];
		a[i][j]=100001;
      }
    }
  }
}

Compilation message

tutorial5.cpp:1:20: error: grader.h: No such file or directory
tutorial5.cpp: In function 'void Delivery(int)':
tutorial5.cpp:25: error: 'Bake' was not declared in this scope
tutorial5.cpp: In function 'void Order(int, int*)':
tutorial5.cpp:53: error: 'Bake' was not declared in this scope