# Include <iostream>
# Include <fstream>
# Include <string>
# Include <sstream>
# Include <map>
# Include <vector>
Using namespace: STD;
# Define N 6
Int main ()
{
String fam_name, fir_name, find_name;
Map <string, vector <string> name;
For (INT I = 0; I! = N; ++ I)
{
Vector <string> first_name;
Cout <"input the" <I + 1 <"map element now:" <Endl;
Cout <"Please input the familly name, end with 'ctrl + Z':" <Endl;
Cin> fam_name;
Cout <"Please input the first name, end with 'ctrl + Z':" <Endl;
While (CIN> fir_name)
First_name.push_back (fir_name );
Name. insert (make_pair (fam_name, first_name ));
Cin. Clear ();
}
Cout <"Please input the familly name you wanna find now:" <Endl;
Cin> find_name;
Map <string, vector <string >>:: iterator iter = Name. Find (find_name );
If (ITER! = Name. End ())
{
Cout <"the first name of the familly name" <find_name <"are:" <Endl;
For (vector <string >:: iterator name_it = ITER-> second. Begin (); name_it! = ITER-> second. End (); ++ name_it)
Cout <* name_it <"";
Cout <Endl;
}
Else cout <"OPPs... can not find" <find_name <Endl;
System ("pause ");
Return 0;
}