Opinion Pool

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

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

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

There are MM not necessarily disjoint sets of people S_1,S_2,,S_MS\_1, S\_2, \cdots, S\_M. For these MM sets and a constant pp (0p10 \le p \le 1), the propositions below are established.

  • For every set S_iS\_i, at least pS_ip \cdot|S\_i| people belonging to S_iS\_i is in support of the issue.

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

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

입력

The first line contains two integers NN and MM, where NN denotes the number of people and MM denotes the number of sets.

The next MM lines describe the information of each of the MM sets.

The ii-th line starts with an integer S_i|S\_i|, denoting the number of elements in the set S_iS\_i, followed by S_i|S\_i| distinct integers S_i,jS\_{i,j}, denoting the elements in the set S_iS\_i.

출력

Output the maximum value of pp 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 10610^{-6}.

제한

  • 1N,M200,0001 \le N,M \le 200\\,000
  • S_i1,2,,NS\_i \subseteq \\{1,2,\cdots,N\\} (1iM)(1 \le i \le M)
  • _i=1MS_i1,000,000\sum\_{i=1}^{M}|S\_i| \le 1\\,000\\,000
  • Everyone appears in at least one set.

힌트

In example 2, the proposition can be established for p=0.5,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,p>0.5, it is a contradiction to the proposition if there exists a person against an issue.