We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#include<map>usingnamespacestd;intmain(){map<int,int>index_output;map<int,int>::iteratorit;intindex,output;cin>>index;// dont need the first valueindex=1;while(cin>>output)index_output[index++]=output;for(it=index_output.begin();it!=index_output.end();it++)cout<<index_output.find(it->second)->second<<endl;return0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Security Permutations
You are viewing a single comment's thread. Return to all comments →
C++ Solution