主题链接: http://poj.org/problem? id=2513 Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 30955 Accepted: 8159 Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is i…
题目链接: http://poj.org/problem?id=2513 http://bailian.openjudge.cn/practice/2513?lang=en_US Time Limit: 5000MS Memory Limit: 128000K Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possi…
题目链接:http://poj.org/problem?id=2513 题目大意:你有好多根棍子,这些棍子的两端分都别涂了一种颜色.请问你手中的这些棍子能否互相拼接,从而形成一条直线呢? 两根棍子只有在颜色相同的时候才能拼接.比如有两根棍子,第一根棍子的两端的颜色分别为blue green,第二根两端的颜色为blue red,那么他们就可以拼接成green blue blue red或者red blue blue green. 解题思路:跟之前写的POJ1386很像,都是首尾连通.但是这里需要用…
http://poj.org/problem?id=2513 Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 37812 Accepted: 9907 Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possi…