Tried my first real codeforces round, got stuck way too long on one of the earlier questions, but over all, you gotta start somewhere i guess

This commit is contained in:
2021-12-21 21:54:41 +01:00
parent 6b735054c5
commit a342d1d04d
8 changed files with 300 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#include <bits/stdc++.h>
using namespace std;
void test_case(int tc){
string s;
cin >> s;
for(size_t i = 0; i < (s.size() + 1) / 2; ++i){
if(s[i] != s[i + (s.size() + 1) / 2]){
cout << "NO\n";
return;
}
}
cout << "YES\n";
return;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
for(int tc = 1; tc <= t; ++tc){
test_case(tc);
}
cout << flush;
return 0;
}