随笔分类 - 01.图论 - (1)并查集
摘要:题目链接:https://zhixincode.com/contest/14/problem/I?problem_id=211 样例输入 1 样例输出 1 27 9 6 样例输出 1 题解: 首先,比较明显地是,每进行一次操作 ,对于目前的卡牌分配情况的种数,其中的 种是被撤掉位子
阅读全文
摘要:题目链接: http://poj.org/problem?id=2513 http://bailian.openjudge.cn/practice/2513?lang=en_US Time Limit: 5000MS Memory Limit: 128000K Description You are
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4514 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Problem Descripti
阅读全文
摘要:题目链接:http://poj.org/problem?id=2912 Time Limit: 5000MS Memory Limit: 65536K Description N children are playing Rochambeau (scissors-rock-cloth) game w
阅读全文
摘要:题目链接:http://poj.org/problem?id=1984 Time Limit: 2000MS Memory Limit: 30000K Case Time Limit: 1000MS Description Farmer John's pastoral neighborhood ha
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3038 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti
阅读全文
摘要:题目链接:http://poj.org/problem?id=1417 Time Limit: 1000MS Memory Limit: 10000K Description After having drifted about in a small boat for a couple of day
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1213 Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to
阅读全文
摘要:题目链接:http://hihocoder.com/problemset/problem/1322 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个包含 N 个顶点 M 条边的无向图 G ,
阅读全文
摘要:Time limit per test: 2.0 seconds Time limit all tests: 15.0 seconds Memory limit: 256 megabytes Time limit per test: 2.0 seconds Time limit all tests:
阅读全文
摘要:Time Limit: 5000MS Memory Limit: 65536K Description There are so many different religions in the world today that it is difficult to keep track of the
阅读全文
摘要:题目链接:http://poj.org/problem?id=3522 Time Limit: 5000MS Memory Limit: 65536K Description Given an undirected weighted graph G, you should find one of s
阅读全文
摘要:Time Limit: 10000MS Memory Limit: 65536K Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a
阅读全文
摘要:Time Limit: 1000MS Memory Limit: 10000K Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用
阅读全文