Description
Imagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. T...
分类:
其他好文 时间:
2014-07-08 21:04:29
阅读次数:
347
http://poj.org/problem?id=2240
深刻体现了自己代码能力有问题外加改模板能力有问题,外加Debug有问题。以后做到:
1、算法原理可以轻易弄出来,
2、代码模板自己收集各种用法,以及已经的做过的改变的方法;
3、没有完整清晰的思路不敲代码;
4、在Debug时没有基本绝对的把握,不点击“编译+运行”,不乱试
回到这道题:
我主要是想把Bellman...
分类:
其他好文 时间:
2014-07-08 19:19:54
阅读次数:
199
旋转可以分为n种置换,对应的不同等价类分别是gcd(n,i)个i=0时不动,有n个
翻转分为奇偶讨论,奇数时有n种置换,每种有n/2+1个
偶数时有n种置换,一半是n/2+1个,一半是n/2个
#include
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;...
分类:
其他好文 时间:
2014-07-08 19:05:15
阅读次数:
163
Tiling
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7437
Accepted: 3635
Description
In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?
...
分类:
其他好文 时间:
2014-07-08 18:57:27
阅读次数:
146
最小生成树+BFS
题意是说在迷宫之中找出连接所有点的最小生成树,其他杂项完全不理会,我理解题意就花了好久。
我用的Kruskal,输入的时候给每个点标号,然后BFS 每个点,找出最近的所有边,接下来就是模版的Kruskal。
因为是迷宫,所以只能用BFS去搜与它相通的每个点的最短路。
不过数据有点坑,建议数组开大一点,我提交的时候RE一次,绝对不止100个...
分类:
其他好文 时间:
2014-07-08 18:34:52
阅读次数:
240
The Lost House
Time Limit: 3000MS
Memory Limit: 30000K
Total Submissions: 2140
Accepted: 886
Description
One day a snail climbed up to a big tree and finally came to th...
分类:
其他好文 时间:
2014-07-08 18:08:00
阅读次数:
267
Description
During winter, the most hungry and severe time, Holedox sleeps in its lair. When spring comes, Holedox wakes up, moves to the exit of its lair, comes out, and begins its new life.
Hol...
分类:
其他好文 时间:
2014-07-08 17:28:54
阅读次数:
256
Description
During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a...
分类:
其他好文 时间:
2014-07-08 16:51:42
阅读次数:
506
Description
Let’s play a puzzle using eight cubes placed on a 3 × 3 board leaving one empty square.
Faces of cubes are painted with three colors. As a puzzle step, you can roll one of the cubes ...
分类:
其他好文 时间:
2014-07-08 16:27:42
阅读次数:
220
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 50740
Accepted: 11394
Description
Assume the coasting is an infinite straight line. Land...
分类:
其他好文 时间:
2014-07-08 15:17:58
阅读次数:
186