#include<iostream> #include<string> using namespace std; typedef long long ll; int main() { string s; ll ans = 0, cnt = 0, res = 0;  ...