subject

You must setup teams to go on deep-space missions for Oganesson Dynamics, exploring new planets, asteroid belts, and astrological anomolies. For each mission, you must make sure the assigned team covers a specific set of skills needed and is as small as possible. For each test, determine the smallest team that you can assemble that possesses all of the needed skills.
NOTE: For this problem, your program must be guaranteed to output the correct answer (or timeout in the process of searching). If your program's output is incorrect for a single test case, it will receive 0 credit on this problem (regardless of how many other test cases it passes). Timing out is allowed, however. Test cases on which you time out will result in no points from that test case, but will not zero out points earned on test cases where your program returned the correct output.
Input Format
The first line has two values, N and K.
N represents the number of candidates for the mission, and K is the number of distinct skills that (combined) the candidates must possess.
The second line has K words on it, listing the specific skills that are required.
The next N pairs of lines each provide information about a single person.
The first line in the pair for person i indicates the number of skills that person has ( Pi ), and the second line lists those Pi specific skills.
Constraints
1 ≤ N ≤ 200
1 ≤ K ≤ 200
0 ≤ Pi ≤ K
Output Format
You must output a single value indicating the fewest people that you can choose for the mission while having all of the needed skills rerpesented.
Example 0
5 6
Botany Neuroscience ArtificialLife Batteries Metals InformationTheory
3
Botany Neuroscience ArtificialLife
2
Botany Batteries
1
Botany
4
Botany Batteries Metals InformationTheory
Example 0 Output: 2
Example 1
10 8
Plastics Fermentation Ceramics InformationTheory CloudComputing EnvironmentalSci Bio Plasma
4
Plastics Fermentation Ceramics InformationTheory
4
Plastics Fermentation CloudComputing EnvironmentalSci
4
Plastics Ceramics Bio Plasma
4
Plastics Fermentation Ceramics CloudComputing
4
Plastics Fermentation Ceramics EnvironmentalSci
4
Fermentation Ceramics InformationTheory CloudComputing
4
Fermentation InformationTheory EnvironmentalSci Plasma
4
Ceramics InformationTheory CloudComputing Bio
4
InformationTheory CloudComputing Bio Plasma
4
InformationTheory CloudComputing EnvironmentalSci Plasma
Example 1 Output: 2

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
The total revenues for a company are $150,223 and the total expenses were 125,766. if you are calculating the net income, which of these spreadsheets would you use? insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2-b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2+b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2/b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2*b3. the formula should be showing in the formula bar.
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
You know the right answer?
You must setup teams to go on deep-space missions for Oganesson Dynamics, exploring new planets, ast...
Questions
question
Mathematics, 01.10.2019 11:20
Questions on the website: 13722362