码迷,mamicode.com
首页 >  
搜索关键字:the monocycle    ( 20个结果
UVA The Monocycle(BFS 4种状态)
Problem A: The Monocycle  A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors a...
分类:其他好文   时间:2015-01-22 18:15:25    阅读次数:303
uva 10047 - The Monocycle bfs
题目链接      Problem A: The Monocycle  A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel...
分类:其他好文   时间:2014-10-20 23:20:06    阅读次数:309
The Monocycle UVA 10047
说说: 这算是一道比较难的题目了,拖到今天终于搞定啦!题意是这样的,有如下这样一个棋盘:一个轮子从S出发开始运动,它有三个选择,沿原方向向前滚一格,或者在原地向左或向右转90度,并且无论是滚动还是转身都将耗时一秒。其中轮子由五种颜色组成,每滚动一个,与地面接触的颜色都将变换一次,如下图所示。假设开始的时候轮子停在S初,方向朝北,颜色为绿色,则能否到达目的地T,且颜色仍旧为绿色,求最短时间。 ...
分类:其他好文   时间:2014-09-29 19:16:31    阅读次数:169
UVA10047- The Monocycle(BFS)
题目链接 题意:一自行车的轮子被分成5个扇区,涂了5种不同颜色。自行车每1秒要么骑到下一个格子,要么左转或者右转90。。一开始自行车面向北,颜色为绿,到达目标格时,必须触底颜色为绿,但朝向无限制。求到达目标格的最短时间。 思路:判重数组多加两维,分别为朝向和颜色,之后就可以用BFS求最少时间了。 代码: #include #include #include #...
分类:其他好文   时间:2014-09-25 12:59:28    阅读次数:234
uva 10047 - The Monocycle
Problem A: The MonocycleA monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel ....
分类:其他好文   时间:2014-08-15 14:27:58    阅读次数:313
【BFS】uva10047The Monocycle
/* 本题的特殊之处,到达一个格子时,因为朝向不同,以及接触地面的颜色不同, 会处于不同的状态;;;;;;;;; 把(x, y, d, c)作为一个结点,表示所在位置(x, y),方向为d,颜色为c;;;;; ------------------------------------------------------------------------ 在方向上我们把前,左,右编号为0,1,2;;...
分类:其他好文   时间:2014-08-09 00:16:56    阅读次数:276
The Monocycle(BFS)
The Monocycle Time Limit: 3000MS64bit IO Format: %lld & %llu [Submit] [Go Back] [Status] Description Problem A: The Monocycle A monocycle is a cycle t...
分类:其他好文   时间:2014-07-22 23:08:53    阅读次数:444
UVA10047_The Monocycle
这题。。。。有点奇葩,但是不难。在矩形方阵里,某人可以往前走或者左拐右拐。都需要消耗一个单位时间。问某人从一个点走向另一个点的最短时间,并且走过的路程是5的倍数。由于n,m都小,直接f[n][m][direction][color],表示所有状态,bfs更新即可。召唤代码君:#include #in...
分类:其他好文   时间:2014-07-14 22:08:59    阅读次数:352
UVA 10047 - The Monocycle
题目如下:  Problem A: The Monocycle  A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with fiv...
分类:其他好文   时间:2014-07-06 11:49:47    阅读次数:233
UVa 10047 - The Monocycle
题目:在一个n*m的迷宫中有一个轮子,轮子的每个72°的扇面被涂上一种不同的颜色。             轮子可以移动到上下左右四个方向的格子中,每次移动到相邻格子中,轮子转动72°。             每个单位时间轮子可以做两种运动:             1.移动到相邻格子;2.改变朝向,面向原来的左、右方(朝向改变90°),但不转动。             初始时轮子在'...
分类:其他好文   时间:2014-05-15 12:28:14    阅读次数:450
20条   上一页 1 2
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!