#include <iostream> #include <string> using namespace std; string s; long long ans=0; void help(int left, int right, int cnt) { if (left >= right) ans += cnt; for (int i = left;i < right;i++) { int j = right; while (j>i) { while (s...