using namespace std;
class Node{
public:
string name;
vector
bool visited;
int groupId;
Node(string str):name(str), visited(false), groupId(-1){}
int getNeighborCount(){
return adj.size();
}
};
class graph{
public:
unordered_map
vector
void createNode(string str){
Node* n = new Node(str);
nodes.push_back(n);
hashNode[str] = n;
}
};
int main()
{
freopen("A-small-practice-1.in", "r", stdin);
freopen("A-small-practice-1.out", "w", stdout);
int input_count;
cin>>input_count;
int counter = 1;
while(input_count)
{
int M;
cin>>M;
graph G;
for(int i=0;i
string str1, str2;
cin>>str1>>str2;
g.AddEdge(str1,str2);
}
cout<<"Case #"<
}
return 0;
}
No comments:
Post a Comment