Description: King s Quest
Time Limit:15000MS Memory Limit:65536K
Total Submit:466 Accepted:130
Case Time Limit:2000MS
Description
Once upon a time there lived a king and he had N sons. And there were N beautiful girls in the kingdom and the king knew about each of his sons which of those girls he did like. The sons of the king were young and light-headed, so it was possible for one son to like several girls.
So the king asked his wizard to find for each of his sons the girl he liked, so that he could marry her. And the king s wizard did it-- for each son the girl that he could marry was chosen, so that he liked this girl and, of course, each beautiful girl had to marry only one of the king s sons.
However, the king looked at the list and said: "I like the list you have made, but I am not completely satisfied. For each son I would like to know all the girls that he can marry. Of course, after he marries any of those girls, for each other son you must still be able to choose the g
To Search:
File list (Check if you may need any files):
1904
....\1094.cpp
....\1094.dsp
....\1094.dsw
....\1094.ncb
....\1094.opt
....\1094.plg