Submission #552

#TimeUsernameProblemLanguageResultExecution timeMemory
552jwvg0425올림픽 피자 (tutorial5)C++98
Compilation error
0 ms0 KiB
#include "pizza.h" int ordernum, a[100000][8],b[8]; int cmd_counter = 0; void Init() { ordernum=0; } void Bake(int K) { printf("%d\n",K); } 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 (stderr)

tutorial5.cpp: In function 'void Bake(int)':
tutorial5.cpp:11: error: 'printf' was not declared in this scope