eolymp
bolt
Try our new interface for solving problems
Problems

Square string

published at 4/1/24, 11:21:34 am

include <bits/stdc++.h> using namespace std;

typedef long long ll; typedef long double ld;

void solve() { string str; cin >> str; bool success = str.length() % 2 == 0; if (success) if (str.substr(0, str.length() / 2) != str.substr(str.length() / 2, str.length() / 2)) success = false;

cout << (success ? "yes" : "no") << endl;

}

int main() { iosbase::syncwith_stdio(false), cin.tie(NULL), cout.tie(NULL);

ifdef _DEBUG

freopen("input-1.txt", "r", stdin);
//freopen("output-1.txt", "w", stdout);

endif

solve();
//int t; cin >> t; while(t--) solve();

return 0;

}

published at 4/1/24, 11:21:52 am

Buyurun köçürün