F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Selecting Problems

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 912    Accepted Submission(s): 155


Problem Description
The college of computer & software is going to hold an ACM contest. N (0<N<=1000) students have registered for the contest, and the teacher LCY has thought up M (0<M<=15) problems numbered from 1 to M. LCY is so familiar with the students that he can forecast the result of every student for the M problems.
Now he will select as many problems as possible from the M problems. And he want at least K (0<=K<=M) students to solve all problems. Will you compute the maximum number of problems he can choose? Output "0" if there is no selection can satisfy the condition.
 

Input
First line of each case contains three integers: N, M and K. Then N lines follow, and each line has the format:
Name P N1 N2 бн NP.
Name (the length won't exceed 20), P (number of problems he/she can solve, 0<=P<=M), then P integers (represent the problems, 1-based).
 

Output
Output the maximum number of problems.
 

Sample Input
2 6 2 zl1 6 1 2 3 4 5 6 zl2 5 1 2 3 4 5 2 3 2 zl1 2 2 3 zl2 1 1
 

Sample Output
5 0
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 13:18:08, Gzip enabled