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

21765번 - Opinion Pool 서브태스크스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB21111010057.143%

문제

MOLOCO, a global company with an unbeatable global reach, is developing a new survey platform to increase user engagement.

There are $N$ people who want to vote on an issue. Each person is either in support of the issue or against the issue.

There are $M$ not necessarily disjoint sets of people $S_1, S_2, \cdots, S_M$. For these $M$ sets and a constant $p$ (0ドル \le p \le 1$), the propositions below are established.

  • For every set $S_i,ドル at least $p \cdot|S_i|$ people belonging to $S_i$ is in support of the issue.

If $p = 0,ドル no information can be obtained from this proposition. $p = 1$ shows that everyone is in support of the issue. That is, as $p$ grows, it becomes easier to ascertain who is in support of the issue.

Thus, if a proposition is established for a sufficiently large $p,ドル we can know that everyone is in support of the issue. Find the maximum value of $p$ such that you can not be certain everyone is in support.

입력

The first line contains two integers $N$ and $M,ドル where $N$ denotes the number of people and $M$ denotes the number of sets.

The next $M$ lines describe the information of each of the $M$ sets.

The $i$-th line starts with an integer $|S_i|,ドル denoting the number of elements in the set $S_i,ドル followed by $|S_i|$ distinct integers $S_{i,j},ドル denoting the elements in the set $S_i$.

출력

Output the maximum value of $p$ such that you cannot be certain everyone is in support of the issue.

Your answer will be considered correct if it has an absolute or relative error less than 10ドル^{-6}$.

제한

  • 1ドル \le N,M \le 200,000円$
  • $S_i \subseteq \{1,2,\cdots,N\}$ $(1 \le i \le M)$
  • $\sum_{i=1}^{M}|S_i| \le 1,000円,000円$
  • Everyone appears in at least one set.

서브태스크 1 (10점)

This subtask has additional constraints:

  • $N \le 10$
  • $M \le 500$

서브태스크 2 (15점)

This subtask has an additional constraint:

  • $N,M \le 500$

서브태스크 3 (75점)

This subtask has no additional constraints.

예제 입력 1

3 3
1 1
1 2
1 3

예제 출력 1

0

예제 입력 2

4 2
2 1 2
2 3 4

예제 출력 2

0.5

예제 입력 3

10 7
4 8 6 10 5
4 9 5 6 1
4 4 8 1 10
4 1 5 9 3
4 6 10 5 1
4 8 3 1 10
6 5 7 6 8 1 2

예제 출력 3

0.833333333

노트

In example 2, the proposition can be established for $p=0.5,$ if people 1, 3 are for and people 2, 4 are against.

However, if the proposition is established for $p>0.5, $ it is a contradiction to the proposition if there exists a person against an issue.

출처

University > KAIST > KAIST RUN Spring Contest > 2021 KAIST RUN Spring Contest C번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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