You are viewing a single comment's thread. Return to all comments →
vector jimOrders(vector> orders) { vector> sum; int i = 1;
for(auto it : orders){ int order = it[0]; int prep = it[1]; sum.push_back({order + prep, i}); i++; } sort(sum.begin(),sum.end()); vector<int> ans; for(auto it : sum){ ans.push_back(it.second); } return ans;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Orders
You are viewing a single comment's thread. Return to all comments →
vector jimOrders(vector> orders) { vector> sum; int i = 1;
}