#include <iostream> #include <ostream> #include <string> using namespace std; int main() { string a,b; cin >> a >>b; if(a.size()<b.size()){ swap(a,b); } for(int i = b.size(); i >= 0; i--){ for(int j = 0 ; j < b.size() - i + 1; j++){ string now = b.substr(j,i); ...