#include using namespace std; queue q; vector v1; void Pop() { q.pop(); } int Top() { return q.front(); } void Delete(int x) { //找到第一个x值,并删除掉 while (q.front() != x) { v1.push_back(q.front()); q.pop(); } //删除x q.pop(); while (!q.empty()) { v1.push_back(q.front()); q.pop(); } //复制回来 for (int i = 0; i < v1.size(); i++)q.push(v1[i]); } const int N = 7; int a[N] = {1, 3, 3, 5, 6, 8, 9}; int main() { //初始化队列 for (int i = 0; i < N; i++) q.push(a[i]); //测试Top cout<