#include #include #include #include using std::map; using std::vector; using std::string; typedef map edges; typedef vector trie; trie build_trie(vector & patterns) { trie t; // write your code here return t; } int main() { size_t n; std::cin >> n; vector patterns; for (size_t i = 0; i < n; i++) { string s; std::cin >> s; patterns.push_back(s); } trie t = build_trie(patterns); for (size_t i = 0; i < t.size(); ++i) { for (const auto & j : t[i]) { std::cout << i << "->" << j.second << ":" << j.first << "\n"; } } return 0; }