当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2624:Thanks for your love

题目描述
Thanks for your love------Do not ask me how many people ever I loved,you do not know how deep my injury. Did not dare, do not want to, should not be, thank you for your love again. I had to exist like a dust or will bring you harm. Did not dare, do not want to, should not be, thank you for your love again. I had to exist in your future.
This is my most fear that brought to your harm Forever.

Zty have N friends, most friends in his feeling were the same but exactly one (while all other people are equal in his felling). In order to detect which is the people that he has different feeling, he ask himself a lot of questions. With this question , your task is to determine the identifier of the friend who he has different feeling about using the results of these questions. We assigning each friend of him a unique integer identifier from 1 to N.
输入解释
The first line of the input file contains two integers N and M, separated by spaces, where N is the number of friends Zty has (2<=N<=10000 ) and M is the number of questions fulfilled (1<=M<=100). The following 2M lines describe all questions. Two consecutive lines describe each question. The first of them starts with a number Ti (1 <= Ti <= N/2), representing the number of friends placed in the left group and in the right group, followed by Ti identifiers of friends placed in the left group and Ti identifiers of friends placed in the right group. All numbers are separated by spaces. The second line contains one of the following characters: '<', '>', or '='.
It represents the result of the sum feelings:
'<' means that the sum of all the feeling in the left group is less than the sum of all the feeling in the right group.
'>' means that the sum of all the feeling in the left group is greater than the sum of all the feeling in the right group,
'=' means that the sum of all the feeling in the left group is equal to the sum of all the feeling in the right group.
输出解释
Write to the output file the identifier of the friend or 0, if it cannot be found by the results of the given questions.
输入样例
5 3
1 1 2
=
1 3 4
>
1 4 5
=
输出样例
3
来自杭电HDUOJ的附加信息
Author WhereIsHeroFrom
Recommend zty

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 醉卧沙场君莫笑

源链接: HDU-2624

最后修改于 2020-10-25T22:55:19+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
12000/4000MS(Java/Others) 32768/32768K(Java/Others)