#include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<map> using namespace std; const int MAXN = 10001; struct data1 { string str; int depth; data1(string str, int depth): str(str), depth(depth) {}; }; void solve(string str) { ...