https://www.acmicpc.net/problem/7785 #include #include #define endl "\n"using namespace std;void CPP_INIT() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);}bool compare(string a, string b) { return a > b;}int main(void) { CPP_INIT(); int input; string str, str2; unordered_map um; vector v; cin >> input; for (int i = 0; i > str >> str2; um[str] = str2; v.push_back(str); } sort(v.b..