-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP1036.cpp
More file actions
40 lines (37 loc) · 765 Bytes
/
P1036.cpp
File metadata and controls
40 lines (37 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <bits/stdc++.h>
using namespace std;
char s[10000];
signed main(){
int n;
while(cin>>n){
n++;
int cnt = 1;
while(n--){
int i=0;
int j;
char ch;
char a[256] = {0};
while((ch=getchar())!='\n')//一直接收缓冲区的字符。直至收到回车
{
a[i]=ch;
i++;
}
a[i]='\0';
if(cnt==1){
cnt++;
continue;
}
cout<<s<<endl;
int flag=1;
for(int i=0;i<strlen(s);i++){
if(s[i]!=s[strlen(s)-i-1]){
flag = 0;
break;
}
}
if(flag) cout<<"Yes\n";
else cout<<"No\n";
}
}
return 0;
}