码迷,mamicode.com
首页 >  
搜索关键字:sticks    ( 387个结果
POJ-2513 Colored Sticks---欧拉回路+并查集+字典树
题目链接: https://vjudge.net/problem/POJ-2513 题目大意: 给一些木棍,两端都有颜色,只有两根对应的端点颜色相同才能相接,问能不能把它们接成一根木棍 解题思路: 题意不难,典型的无向图判断是否存在欧拉通路或回路的问题。 1、欧拉通路或回路的判定条件是图联通,并且度 ...
分类:其他好文   时间:2018-04-26 14:05:08    阅读次数:145
Just a Hook HDU - 1698
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
POJ#1011 Sticks
漂亮小姐姐点击就送: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
[poj2653]Pick-up sticks
题目大意:给定一系列线段,以及放在平面上的顺序,给出没有被其他覆盖的线段。 解题关键:线段相交的判断。 满足两个条件即可:快速排斥实验、跨立实验。 ...
分类:其他好文   时间:2018-04-06 18:36:09    阅读次数:143
hdu5543(Pick The Sticks) 01背包
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
POJ2513_Colored Sticks_KEY
题目传送门 题目大意:给你若干根木棍,每根木棍有前后两种颜色,连接两根木棍需要前后颜色相同,求能否将所有木棍连接在一起。 Solution: 不要将木棍看成点,将颜色看成点。 其实就是求是否存在欧拉路径。 有欧拉路径要满足两个条件: 图是连通图。 没有或只有两个入度为奇数的点。 判断连通性用并查集。 ...
分类:其他好文   时间:2018-03-14 12:46:45    阅读次数:169
POJ2513Colored Sticks(欧拉路加字典树)
传送门 ...
分类:其他好文   时间:2018-03-06 21:50:12    阅读次数:160
POJ2513 Colored Sticks(Trie+欧拉回路)
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 -HZNU寒假集训
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
CF - 高精度 + 贪心
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
387条   上一页 1 ... 5 6 7 8 9 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!