题目链接: https://vjudge.net/problem/POJ-2513 题目大意: 给一些木棍,两端都有颜色,只有两根对应的端点颜色相同才能相接,问能不能把它们接成一根木棍 解题思路: 题意不难,典型的无向图判断是否存在欧拉通路或回路的问题。 1、欧拉通路或回路的判定条件是图联通,并且度 ...
分类:
其他好文 时间:
2018-04-26 14:05:08
阅读次数:
145
Now Pudge wants to do some operations on the hook. Let us number the consecutive metallic sticks of the hook from 1 to N. For each operation, Pudge ca ...
分类:
其他好文 时间:
2018-04-15 14:56:51
阅读次数:
183
漂亮小姐姐点击就送:http://poj.org/problem?id=1011 Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 151718 Accepted: 36127 Description George t ...
分类:
其他好文 时间:
2018-04-08 18:03:16
阅读次数:
159
题目大意:给定一系列线段,以及放在平面上的顺序,给出没有被其他覆盖的线段。 解题关键:线段相交的判断。 满足两个条件即可:快速排斥实验、跨立实验。 ...
分类:
其他好文 时间:
2018-04-06 18:36:09
阅读次数:
143
Pick The Sticks Time Limit: 15000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2540 Accepted Submission(s): 85 ...
分类:
其他好文 时间:
2018-03-28 00:03:31
阅读次数:
230
题目传送门 题目大意:给你若干根木棍,每根木棍有前后两种颜色,连接两根木棍需要前后颜色相同,求能否将所有木棍连接在一起。 Solution: 不要将木棍看成点,将颜色看成点。 其实就是求是否存在欧拉路径。 有欧拉路径要满足两个条件: 图是连通图。 没有或只有两个入度为奇数的点。 判断连通性用并查集。 ...
分类:
其他好文 时间:
2018-03-14 12:46:45
阅读次数:
169
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st ...
分类:
其他好文 时间:
2018-03-03 14:06:56
阅读次数:
167
Wooden Sticks There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodwo ...
分类:
其他好文 时间:
2018-02-27 10:59:37
阅读次数:
179
Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob an ...
分类:
其他好文 时间:
2018-02-17 11:05:49
阅读次数:
169