This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |