[问题] 单班计程HW12

楼主: bonbon820705 (榜榜)   2011-12-22 13:31:10
请问
如果有四个人 A B C D
A是B的朋友
A是C的朋友
而C又是D的朋友
那D和B算不算是朋友??
作者: tiefblau (tiefblau)   2011-02-22 13:35:00
bonbon
作者: elqqaapple (果苹苹果)   2011-02-22 13:58:00
bonbon
作者: cchao28   2011-02-22 18:18:00
bonbon
作者: bemyself (self)   2011-02-22 18:47:00
B<->A<->C<->D 所以我猜应该 是 ....改了 所以不是^^
作者: raichu2652   2011-02-22 21:33:00
所以说中间"只"夹一个人以下才算是朋友吗?
作者: suhorng ( )   2011-02-22 21:55:00
The two people will be friends if and only if thereexists a friend struct containing both of their ids.In other words, if we treat the friend struct as edges, then the problems is asking whether two vertices aredirectly connected by an edge
作者: cebrusfs (可鲁贝洛斯)   2011-02-22 21:58:00
原先sample似乎有错OAO?
楼主: bonbon820705 (榜榜)   2011-02-22 23:01:00
我记得P老师下课前有讲朋友的朋友算是朋友
作者: telgniw (易)   2011-02-22 23:38:00
题目的意思是说只有struct friends说是朋友的才是朋友

Links booklink

Contact Us: admin [ a t ] ucptt.com