You are viewing a single comment's thread. Return to all comments →
vector<int> permutationEquation(vector<int> p) { vector<int>ans; for(int i=1;i<=p.size();i++){ int it=find(p.begin(),p.end(),i)-p.begin(); int iit=find(p.begin(),p.end(),it+1)-p.begin(); ans.push_back(iit+1); } return ans; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sequence Equation
You are viewing a single comment's thread. Return to all comments →