一个acm试题,怎样判断是不是数据结尾

本文探讨了乔治·贝克莱提出的著名哲学难题:如果一棵树倒在森林里,而周围没有人听到,那么这棵树倒下时是否发出了声音?文章进一步介绍了贝克莱的主观唯心主义思想,并通过一个关于森林中树木倒下是否发出声音的数学问题来引发读者对于‘存在’与‘感知’之间关系的思考。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

If a tree falls in the forest, and there's nobody there to hear, does it make a sound? This classic conundrum was coined by George Berkeley (1685-1753), the Bishop and influential Irish philosopher whose primary philosophical achievement is the advancement of what has come to be called subjective idealism. He wrote a number of works, of which the most widely-read are Treatise Concerning the Principles of Human Knowledge (1710) and Three Dialogues between Hylas and Philonous (1713) (Philonous, the "lover of the mind," representing Berkeley himself).


Input

A forest contains T trees numbered from 1 to T and P people numbered from 1 to P. Standard input consists of a line containing P and T followed by several lines, containing a pair of integers i and j, indicating that person i has heard tree j fall. People may have different opinions as to which trees, according to Berkeley, have made a sound.

Input contains multiple test cases. Subsequent test cases are separated with a single blank line.


Output

How many different opinions are represented in the input? Two people hold the same opinion only if they hear exactly the same set of trees. You may assume that P < 100 and T < 100.


Sample Input

3 4
1 2
3 3
1 3
2 2
3 2
2 4


Sample Output

2

请问我怎样才知道当输入2 4的时候代表数据输入完毕
 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值