队列模拟
2023-08-06 16:22:14
发布于:上海
#include <bits/stdc++.h>
using namespace std;
const int N=1e9+10;
int q[N],head=0,tail=0;
void push(int n){ q[++tail]=n; }
void pop(){ ++head; }
int front(){ return q[head+1]; }
int back(){ return q[tail]; }
int size(){ return tail-head; }
bool empty(){ return head==tail; }
int main() {
return 0;
}
这里空空如也
有帮助,赞一个