skip to main | skip to sidebar

Machine Vision and a Programming Life

Tuesday, November 1, 2011

贪吃蛇走法


给一个吸地毯的irobot,和一个长方形的屋子,四面有墙,四个指令:
Bool moveForward()//向前走一格,走不了的话返回false
Void Rotate(int degree)//就是左拐右拐
Bool isClean()//当前单元格是否干净
Void clean()
把irobot 扔在屋子任意位置,写代码让irobot清理房间,每一格都要走过(单元格没有坐标)。
Posted by Unknown at 10:46 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2012 (3)
    • ►  July (1)
    • ►  June (2)
  • ▼  2011 (44)
    • ►  December (3)
    • ▼  November (17)
      • Pigs Get Fat, Hogs Get Slaughtered!
      • How to design a parking lot?
      • how to fit data into two probability density funct...
      • tic-tac-toe OOD design
      • How to post source code in blogspot
      • Correlation does not imply causation
      • smart_ptr vs weak_ptr
      • Suffix tree
      • Rectangle overlap
      • Linear programming: maximal sum of subsequence
      • Array rearranging algorithm
      • 贪吃蛇走法
      • Stack and Queue
      • What is a good OOD design answer?
      • Property of bitwise XOR
      • Find Two Numbers in an Array that Sum to a Particu...
      • How can we check whether a BT is a BST?
    • ►  October (11)
    • ►  September (4)
    • ►  June (6)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2010 (38)
    • ►  November (7)
    • ►  October (18)
    • ►  September (13)
  • ►  2009 (2)
    • ►  September (2)

About Me

Unknown
View my complete profile