leetcode933使用队列

  1. 输入的时间是递增的
  2. 输出 的时[t-3000,t]
queue <int>q;
int ping(int t){
  q.push(t);
  while(q.front<t-3000){
     q,pop();   
      }    
  return q.size();  
}

 

posted @ 2023-07-03 13:55  iu本u  阅读(14)  评论(0)    收藏  举报