正文
增加 2 行删除 2 行
17 行未改动1819202122232425266 行未改动3334353637383940416 行未改动17 行未改动map<string,vector<string> >t,fr;int main() {cin >> n;for(int i = 1;i <= n;i++) {string x,y;cin >> x >> y;t[x].push_back(y);fr[y].push_back(x);}6 行未改动for(auto j :fr[i]) {if(j != f) {cout << j << " ";flag = true;goto a;}}if(flag) break;}6 行未改动17 行未改动1819202122232425266 行未改动3334353637383940416 行未改动17 行未改动map<string,vector<string> >t,fr;int main() {cin >> n;for(int i = 1;i <= n;i++) {string x,y;cin >> x >> y;t[x].push_back(y);fr[y].push_back(x);}6 行未改动for(auto j :fr[i]) {if(j != f) {cout << j << " ";flag = true;goto a;}}if(flag) break;}6 行未改动