Created
August 19, 2016 21:22
-
-
Save eltonvs/1b553fe591dc3de28fca776436b91806 to your computer and use it in GitHub Desktop.
kjdvdsknbdcbj k KÇN KMÇcCJ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <queue> | |
#include <list> | |
int main() { | |
int n, c = 1; | |
int map[1000000]; | |
int t_map[1001]; | |
std::string line; | |
while (std::cin >> n && n) { | |
std::queue<std::queue<int>> teams; // | |
std::list<std::queue<int>> final_queue; | |
for (int i = 0; i < n; i++) { | |
int nt, tmp; | |
std::cin >> nt; | |
std::queue<int> team; // | |
while (nt--) { | |
std::cin >> tmp; | |
team.push(tmp); // | |
map[tmp] = i; | |
} | |
teams.push(team); // | |
} | |
std::cout << "Scenario #" << c++ << std::endl; | |
std::cin.ignore(); | |
while(std::getline(std::cin, line) && line != "STOP") { | |
if (line[0] == 'E') { | |
int p = std::stoi(line.substr(8)); | |
std::cout << p << " team = " << map[p] << "\n"; | |
t_map[] | |
} | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment