#include<iostream> #include<cstdio> #include<string> using namespace std; void reverse(string &s, int left, int length){ int right = left + length - 1; for(int i = left,j = right;i < (left+right+1)/2;++i,--j){ char temp = s[i]; s[i] = s[j]; s[...