Rating changes for last rounds are temporarily rolled back. They will be returned soon.
×
# |
Author |
Problem |
Lang |
Verdict |
Time |
Memory |
Sent |
Judged |
|
142018689 |
Practice:
ypa |
1619A
- 13
|
C++17 (GCC 7-32)
|
Accepted
|
15 ms
|
0 KB
|
2022-01-08 19:40:20 |
2022-01-08 19:40:20 |
|
#include <bits/stdc++.h>
#define long long long
#define Integer_MAX_VALUE 0x7fffffff
#define Integer_MIN_VALUE 0x80000000
#define Long_MAX_VALUE 0x7fffffffffffffffL
#define Long_MIN_VALUE 0x8000000000000000L
using namespace std;
struct Solution
{
void run()
{
string s;
cin >> s;
int len = s.length();
if (len % 2 != 0)
{
cout << "NO" << endl;
return;
}
for (int i = 0; i < len / 2; i++)
{
if (s[i] != s[i + len / 2])
{
cout << "NO" << endl;
return;
}
}
cout << "YES" << endl;
}
};
int main()
{
ios_base::sync_with_stdio(false);
Solution solution = Solution();
int t;
cin >> t;
for (int i = 0; i < t; i++)
{
solution.run();
}
return 0;
}
Click to see test details