摘要:
看了别人的答案,这题的关键在于数据结构的选择,一开始选择的multimap肯定MLE 1 class Solution { 2 public: 3 void getPath(vector > &ansSet, vector &ans, int now, vector > &pa, vector &que) 4 { 5 if (now == -1) 6 { 7 ansSet.push_back(vector(0)); 8 for (int i = ans.size() - 1; i >= 0; i-... 阅读全文