队列 123456789101112131415// 队尾插入元素,队头弹出元素int q[N], hh=0, tt=-1; // 队头head, 队尾tail// 插入q[++tt] = x;//弹出hh++;// 判断是否为空if(hh<=tt) not empty;else empty;// 取出队头元素q[hh]