#include "pizza.h"
int order_num, a[100000][8],b[8];
void Init()
{
order_num=0;
}
void Delivery(int I)
{
int i,j,t=0;
b[I]++;
for(i=0;i<order_num;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[order_num][A[i]]=1;
}
order_num++;
for(i=0;i<order_num;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;
}
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
4040 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
3 |
Halted |
0 ms |
0 KB |
- |
4 |
Halted |
0 ms |
0 KB |
- |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
56 ms |
4040 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
3 |
Halted |
0 ms |
0 KB |
- |
4 |
Halted |
0 ms |
0 KB |
- |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
3 |
Halted |
0 ms |
0 KB |
- |
4 |
Halted |
0 ms |
0 KB |
- |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
3 |
Halted |
0 ms |
0 KB |
- |
4 |
Halted |
0 ms |
0 KB |
- |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |