Problem Description
Continuous Same Game is a simple game played on a grid of colored blocks. Groups of two or more connected (orthogonally, not diagonally) blocks that are the same color may be remo...
分类:
其他好文 时间:
2014-08-13 22:29:17
阅读次数:
288
Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the or...
分类:
其他好文 时间:
2014-08-12 00:09:03
阅读次数:
154
给一个长度为n的字符串,每次删除字母相同切连续的串,如果有多个,删除最左边的、最长的串。每次删除输出串的字母,每个字母的下标(1-n)
N (1 ≤ N ≤ 10e6),串只包括red (‘R’), green (‘G’) or blue (‘B’)...
分类:
其他好文 时间:
2014-08-11 12:07:52
阅读次数:
208
题意:给定一些木棒,木棒两端都涂上颜色,求是否能将木棒首尾相接,连成一条直线,要求不同木棒相接的一边必须是相同颜色的。 转:kuangbing 无向图存在欧拉路的充要条件为: ① 图是连通的; ② 所有节点的度为偶数,或者有且只有两个度为奇数的节点。 图的连通可以利用并查集去判断。 度数的统计比较容...
分类:
其他好文 时间:
2014-08-08 12:18:15
阅读次数:
157
Fighting the Landlords
大意:
斗地主。。。。 分别给出两把手牌,肯定都合法。每张牌大小顺序是Y (i.e. colored Joker) > X (i.e. Black & White Joker) > 2 > A (Ace) > K (King) > Q (Queen) > J (Jack) > T (10) > 9 > 8 > 7 > 6 >...
分类:
其他好文 时间:
2014-08-07 23:15:45
阅读次数:
348
Fighting the Landlords大意:斗地主。。。。 分别给出两把手牌,肯定都合法。每张牌大小顺序是Y (i.e. colored Joker) > X (i.e. Black & White Joker) > 2 > A (Ace) > K (King) > Q (Queen) > ....
分类:
其他好文 时间:
2014-08-07 22:02:42
阅读次数:
288
其实我目前还没有实现。references:http://qt-project.org/faq/answer/how_can_i_convert_a_colored_qpixmap_into_a_grayscaled_qpixmaphttp://www.qtcentre.org/threads/46...
分类:
其他好文 时间:
2014-08-04 13:53:57
阅读次数:
632
Problem Description
Continuous Same Game is a simple game played on a grid of colored blocks. Groups of two or more connected (orthogonally, not diagonally) blocks that are the same color may be r...
分类:
其他好文 时间:
2014-08-03 23:21:29
阅读次数:
336
poj 2513 Colored Stickshttp://poj.org/problem?id=2513题意:现在有几个木棒,每个木棒端点都着色,问:能否将它们排成一排,同时要满足相邻的的两端点颜色是一样的。trie+并查集+欧拉通路方法:要想排成一排,可以变向的理解为从一个图里找到一个欧拉通路(...
分类:
其他好文 时间:
2014-08-03 12:31:15
阅读次数:
254
题目地址:Colored Sticks题目大意: 给你多个木棒,每个木棒的两头分别着色,使所有木棒首尾排成一条直线,相互接触的端点颜色必须是相同的,问你有没有这种可能性。解题思路: 先是利用trie树将所给的所有颜色字符串标序。因为是每个木棒只能用一次,简单看成一个木棒的首尾相当于图中的一条连线,....
分类:
其他好文 时间:
2014-08-01 19:19:12
阅读次数:
212