Submission #3157

#TimeUsernameProblemLanguageResultExecution timeMemory
3157gs13105올림픽 피자 (tutorial5)C++98
0 / 100
48 ms4604 KiB
#include <stdio.h> #include <memory.h> #include "pizza.h" int now,ordernum; int in[8],arr[100000][8],num[100000]; void Init() { now=0; ordernum=0; memset(arr,0,sizeof(in)); } void chk() { int f=1,i; if(now!=ordernum) { for(i=0;i<num[now];i++) if(in[arr[now][i]]==0) f=0; if(f) { for(i=0;i<num[now];i++) in[arr[now][i]]--; Bake(now++); } } } void Order(int N,int* A) { int i; num[ordernum]=N; for(i=0;i<N;i++) arr[ordernum][i]=A[i]; ordernum++; chk(); } void Delivery(int I) { in[I]++; chk(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...