Problem 1916 --Problem D: Forests

1916: Problem D: Forests

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $3$ 正确数量 $2$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签

Problem D: Forests

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).

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 T and P 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. 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.

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

推荐代码 查看1916 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] 淡意的温柔 589277 2020-05-31 14:52:23
内存最少[$1100 $KB] AOJ大管家 84431 2017-04-27 15:29:16
第一AC AOJ大管家 84431 2017-04-27 15:29:16
第一挑战 AOJ大管家 84431 2017-04-27 15:29:16

赛题来源/所属竞赛 NA N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛