struct Q{
    int q[N],hh=1,tt=0;
     void push(int x){ q[++tt]=x; }
     void pop(){hh++;}
     
     bool empty(){return hh<=tt?0:1;}
     int front(){
         return q[hh];
     }
     
 };

 

posted on 2023-02-15 23:59  towboat  阅读(15)  评论(0)    收藏  举报