摘要: 好久没写图论练练手。 这道题有两种解法:tarjan和并查集。我用的是tarjan缩点。 缩完点之后就只需要找出入度为0的新点有多少个就可以了。 md这道题卡快读??? 代码: cpp include include const int maxn = 205; struct Nodes { int 阅读全文
posted @ 2018-09-12 13:30 Garen-Wang 阅读(142) 评论(0) 推荐(0) 编辑