1 条题解
-
0
#include <bits/stdc++.h> using namespace std; bool chk2(string s){ string s2=s; reverse(s2.begin(),s2.end()); if(s==s2) return true; else return false; } bool chk(string s){ string s1,s2; int len=s.length(); for(int i=2;i<=len-2;i++){ s1=s.substr(0,i); s2=s.substr(i,len-i); if(chk2(s1) && chk2(s2)) return true; } return false; } int main(){ int n; string s; // cin >> n; while(n--){ cin >> s; // if(chk(s)) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }
- 1
信息
- ID
- 619
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 8
- 标签
- (无)
- 递交数
- 20
- 已通过
- 7
- 上传者