Start: Jun, 30, 2019 09:00:00
2019年度暑期短学期第十天 助教场
End: Jul, 08, 2019 23:59:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 10ms
Memory: 1756kB
Author: 2018212212028
In contest: 1290

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
#include<set>
#define ll long long
using namespace std;
const int N = 1010;
const int inf = 0x3f3f3f3f;
#define PI 3.141592653589
#define fr(i,r,l) for(int i=r;i<l;i++)
int main()
{
	int t;
	cin >> t;
	getchar();
	while (t--)
	{
		char a[N];
		scanf("%s", a);
		int lazy = 0;
		for (int i = 0; i < strlen(a); i++)
		{
			int flag = 1;
			for (int j = 0, k = strlen(a) - 1; j <= strlen(a) / 2; j++, k--)
			{
				if (j == i)j++;
				if (k == i)k--;
				if (a[j] != a[k])
				{
					flag = 0;
				}
			}
			if (flag == 1)
			{
				lazy = 1;
			}
		}
		if (lazy == 1)printf("Yes\n");
		else printf("No\n");
	}
}