都是循环队列的最基本应用,都是简单模拟,就不多讲了。
POJ 3125
题目传送门:http://poj.org/problem?id=3125
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
using namespace std;
const int MAX = 105;
int main()
{
int t;
scanf("%d",&t);
int n,loc;