#include<iostream> #include<stack> using namespace std; void out(string s1,string s2,int low1,int high1,int low2,int high2,stack<char> &s){ if(low1 > high1 || low2 > high2)return; char head = s1.at(low1); int p = low2; while(s2.at(p)!=head)p++; s.push(head); int len...