Logo
(追記) (追記ここまで)

31528번 - Diverse Contest 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
10 초 (추가 시간 없음) 2048 MB60452288.000%

문제

Write what you know! The judges for a certain programming competition have $n$ problems and are trying to prepare a contest using $k$ of them.

The judges have tagged each problem with a list of topics needed to solve that problem. To not overly punish teams for not knowing a specific topic, for any given topic, at most half of the problems on the contest can have that topic.

Compute the number of distinct contests the judges can prepare. Two contests are different if there is a problem that appears in one contest but not the other. In particular, the order of the problems in the contest does not matter.

입력

The first line of input has two integers $n$ and $k$ where $n$ (2ドル \leq n \leq 20$) is the number of proposed problems and $k$ (2ドル \leq k \leq n$) is the number of problems that will be used in a contest. The next $n$ lines each begin with an integer $t$ (1ドル \leq t \leq 20$), the number of topics for that problem. Then follow $t$ unique topics. Each topic is a string of lowercase letters, each of length at most 10ドル$.

출력

Output the number of distinct contests the judges can prepare.

제한

예제 입력 1

5 3
1 string
2 string queue
1 queue
2 dp greedy
1 math

예제 출력 1

5

힌트

출처

ICPC > Regionals > North America > Mid-Central Regional > 2023 Mid-Central USA Programming Contest H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /