ze);
}
Pop(Q, QueueSize);
int temp;
temp = Q->front;
while (temp != Q->rear) {
cout << Q->base[temp] << " ";
temp = (temp + 1) % (QueueSize + 1);
}
cout << endl;
cout << Q->base[Q->front] << endl;
}
void main() {
int QueueSize;
cin >> QueueSize;
SqQueue Q;
Q = (SqQueue)malloc(QueueSize * sizeof(SQueue));
InitQueue(Q, QueueSize);
int Arr[1000];
int i = 0;
while (1) {
cin >> Arr[i];
i++;
char c = getchar();
if (c == '\n')
break;
}
int len = i;
i = 0;
while (i < len && i < QueueSize) {
Push(Q, QueueSize, Arr[i]);
i++;
}
ElemType e;
cin >> e;
if (i == QueueSize) cout << "yes" << endl;
else cout << "no" << endl;
Pop_Queue(Q,e, QueueSize);
}
10-24
1210
04-01
1817
05-24