Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::pair<std::vector<int>, std::vector<std::pair<int, int>>>
- ReadGoldAndTrusts(std::istream &in_stream) {
- int people_amount, trusts_amount;
- std::vector<int> golds;
- std::vector<std::pair<int, int>> trusts;
- in_stream >> people_amount >> trusts_amount;
- golds.resize(people_amount);
- for (auto &person : golds) {
- in_stream >> person;
- }
- trusts.resize(trusts_amount);
- for (auto &[from, to] : trusts) {
- in_stream >> from >> to;
- }
- return {golds, trusts};
- }
Advertisement
Add Comment
Please, Sign In to add comment