Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- std::map <std::string, std::vector<std::string>> buses; //key - bus, value - stops
- std::map <std::string, std::vector<std::string>> stops; //key - stop, value - buses
- int Q = 0;
- std::cin >> Q;
- for (int i = 0; i < Q; ++i){
- std::string command;
- std::cin >> command;
- if (command == "NEW_BUS"){
- NewBus(buses, stops);
- } else if (command == "BUSES_FOR_STOP"){
- string s;
- std::cin >> s;
- BusesForStop(s, stops);
- } else if (command == "STOPS_FOR_BUS"){
- std::string s;
- std::cin >> s;
- StopsForBus(s, buses, stops);
- } else if (command == "ALL_BUSES"){
- AllBuses(buses);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement