2018 UESTC Training for Data Structures 三澄美琴的心里只有学习

三澄美琴的心里只有学习

队列

//33MS   1972KB
#include 
#include 
#include 
#include 
using namespace std;
const int MAX=1e5+5;
queue >Q;
void read(int &x)
{
    int f=1;x=0;char c=getchar();
    while (c>'9'||c<'0'){if (c=='-')f=-1;c=getchar();}
    while (c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
    x*=f;
}
int main ()
{
    int n,x,t,a,b;
    read(n);
    while (!Q.empty()) Q.pop();
    for (int k=0;k

你可能感兴趣的:(数据结构)