![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tarjan
paranoidZ
这个作者很懒,什么都没留下…
展开
-
E. Chain Email
woc:关同步流就不能用scanf和printf了A chain email is an email that people receive and then forward to all of their friends. This sort of email is very common amongst elderly people, who have notably bad memories. Elderly people’s memories are so bad that if they ..原创 2020-06-02 23:08:43 · 1108 阅读 · 0 评论 -
受欢迎的牛(tarjan)
题目连接:https://ac.nowcoder.com/acm/problem/19960题目描述每一头牛的愿望就是变成一头最受欢迎的牛。现在有N头牛,给你M对整数(A,B),表示牛A认为牛B受欢迎。这种关系是具有传递性的,如果A认为B受欢迎,B认为C受欢迎,那么牛A也认为牛C受欢迎。你的任务是求出有多少头牛被所有的牛认为是受欢迎的。输入描述:第一行两个数N,M。接下来M行,每行两个数A,B,意思是A认为B是受欢迎的(给出的信息有可能重复,即有可能出现多个A,B)输出描.原创 2020-05-16 23:30:30 · 513 阅读 · 1 评论 -
AtCoder Beginner Contest 167 D:
题目D - TeleporterTime Limit: 2 sec / Memory Limit: 1024 MBScore:400400pointsProblem StatementThe Kingdom of Takahashi hasNNtowns, numbered11throughNN.There is one teleporter in each town. The teleporter in Townii(1≤i≤N)(1≤i≤N)sends you...原创 2020-05-12 11:20:01 · 345 阅读 · 0 评论