macb() ? lpcbyu(&gbcq/_\021%ocq\012\0_=w(gbcq)/_dak._=}_ugb_[0q60)s+
这是CoolShell博主之前做了一个很有意思的在线puzzle,仿照一些前端过关的游戏,做了几个和程序员有关的迷题,一个通关游戏,这个事测试的第二题。并为通关的前十名送上《Unix环境高级编程(第三版)》(感...
分类:
编程语言 时间:
2014-08-16 12:33:50
阅读次数:
263
Twilight Sparkle once got a crystal from the Crystal Mine. A crystal of size n (n is odd; n?>?1) is an n?×?n matrix with a diamond inscribed into it.Y...
分类:
其他好文 时间:
2014-08-15 20:54:59
阅读次数:
210
HDU 4021 24 Puzzle (拼图)
题目大意:
给定24个数的位置如图,现在给你24个数,0表示空格,问你是否能由起始位置到终点位置。
解题思路:
首先空格除外,八个角一定是一样的,然后其它的就得满足
(1)如果矩阵列数是奇数,逆序数必须同奇同偶,
(2)如果矩阵列数是偶数,逆序数加上0位置的行数之差必须同奇同偶。...
分类:
其他好文 时间:
2014-08-15 19:40:39
阅读次数:
278
Play on WordsSome of the secret doors contain avery interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because th...
分类:
其他好文 时间:
2014-08-15 14:34:48
阅读次数:
216
Description
Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of d...
分类:
其他好文 时间:
2014-08-14 23:55:56
阅读次数:
329
class Edge { enum Type { inner, outer, flat } Piece parent; Type type; boolean fitsWith(Edge type) { }; // Inners & outer f...
分类:
其他好文 时间:
2014-08-12 06:51:13
阅读次数:
208
There is one last gate between the hero and the dragon. But opening the gate isn't an easy task.
There were n buttons list in a straight line in front of the gate and each with an integer on it. Like...
分类:
其他好文 时间:
2014-08-11 21:22:33
阅读次数:
341
~~~~
题目链接:http://poj.org/problem?id=3221
显然是BFS找最优解,可是终止条件不好写,看到有一只队交上去一直TLE。
比赛完了看题解原来是以目标状态为起点,BFS给每个状态打表,用一个map映射存起来。
~~~~
#include
#include
#include
#include
#include
#include
#include
using ...
分类:
其他好文 时间:
2014-08-11 11:58:32
阅读次数:
276