{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"牛们最近在拍电影,所以他们准备去玩一个游戏——“六度分割”的变体。\n游戏是这样进行的:每个牛离自己的距离是0度,如果两个不同的牛同时出现在一个电影里,那么他们之间的距离为1度,如果两只牛从未一起工作,但它们都与第三只牛一起工作,那么他们之间的距离为2度。\n这N(2\u003c\u003dN\u003c\u003d300)头牛对找出那只牛与所有牛之间的平均距离最短感兴趣。当然,不算上他自己。这些牛拍了M(1\u003c\u003dM\u003c\u003d10000)部电影,并且保证每两个牛之间都有一定的关系。求那一头牛与其它牛距离的平均值最小值,把它乘100输出。"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n * Line 1: Two space-separated integers: N and M \n \u003cbr\u003e \n \u003cbr\u003e* Lines 2..M+1: Each input line contains a set of two or more space-separated integers that describes the cows appearing in a single movie. The first integer is the number of cows participating in the described movie, (e.g., Mi); the subsequent Mi integers tell which cows were. \n \u003cbr\u003e\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n * Line 1: A single integer that is 100 times the shortest mean degree of separation of any of the cows. \n \u003cbr\u003e\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e4 2\n3 1 2 3\n2 3 4\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e100\n\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n [Cow 3 has worked with all the other cows and thus has degrees of separation: 1, 1, and 1 -- a mean of 1.00 .] \n \u003cbr\u003e\n \u003c/div\u003e"}}]}