【 UVA - 10935 】Throwing cards away I (卡片游戏) deque双端队列
题目链接代码:#include#include#includeusingnamespacestd;intmain(){intn;while(cin>>n&&n){dequeq;for(inti=1;i1)//至少两个时{cout2)cout<<",";q.pop_front();//丢掉队首q.push_back(q.front());//新的队首放队尾q.pop_front();//新的队首丢掉