POJ 3434 Terrarium:题目解答源码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了POJ 3434 Terrarium:题目解答源码相关的知识,希望对你有一定的参考价值。

      POJ 3434 Terrarium:题目解答源码

      A zoology research lab has a terrarium with rare species of snakes.Terrarium is a flat box filled with soil,and has a glass top allowing to watch the snakes.There are trenches in the soil,and snakes constantly move along the trenches.All snakes have diameter of 1 cm and integer length of no less than 2 cm.

      While watching the snakes,the zoologists discovered a pattern in their movement:each snake moves at a speed of 1 cm per second forward,until it encounters either a wall or another snake.Faced an obstacle,snake first tries to turn right,if there is also obstacle on the right,then it tries to turn left.If there is obstacle on the left also,the snake waits for a second before trying to move again.

      程序源码

      源代码如下:

技术分享

      点击了解完整源代码!


以上是关于POJ 3434 Terrarium:题目解答源码的主要内容,如果未能解决你的问题,请参考以下文章

bzoj3434[wc2014]时空穿梭

POJ 1000:两数之和

POJ3255

poj 1258 农场网络 最小生成树

B - Brainman (POJ - 1804)

bzoj3434 [Wc2014]时空穿梭