摘要: 来一道裸代码。输入:一个图有向图。输出:它每个强连通分量。 这个图就是刚才讲的那个图。一模一样。 input: 6 8 1 3 1 2 2 4 3 4 3 5 4 6 4 1 5 6 output: 6 5 3 4 2 1 代码: 还有各大理解网站: (杂着看,就可以看懂) http://blog. 阅读全文
posted @ 2018-04-23 21:49 姿态H 阅读(1722) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-2186 Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you ar 阅读全文
posted @ 2018-04-16 21:52 姿态H 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-3268 One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to 阅读全文
posted @ 2018-04-15 17:00 姿态H 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-3190 Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise 阅读全文
posted @ 2018-04-15 15:32 姿态H 阅读(754) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-3259 While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very pe 阅读全文
posted @ 2018-04-15 15:12 姿态H 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目: http://codeforces.com/gym/101630 E A young hero is starting his heroic life. The wise wizard suggested him an easy first quest. During this quest o 阅读全文
posted @ 2018-04-15 10:42 姿态H 阅读(805) 评论(1) 推荐(0) 编辑
摘要: inline int Read() { int x = 0, f = 1, c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') f = -1; for (; isdigit(c); c = getchar()) x = x * 10 + c... 阅读全文
posted @ 2018-04-12 20:48 姿态H 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-2376 Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He a 阅读全文
posted @ 2018-04-10 20:03 姿态H 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题目:http://hdu.hustoj.com/showproblem.php?pid=5876 In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinc 阅读全文
posted @ 2018-03-28 21:23 姿态H 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目:https://vjudge.net/problem/POJ-3669 Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into eart 阅读全文
posted @ 2018-03-20 21:39 姿态H 阅读(389) 评论(0) 推荐(0) 编辑