摘要: Problem A.Ant on a ChessboardBackgroundOne day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard according to this way: (you can assume that her speed is one grid per second)At the first second, Alice was standing at (1,1 阅读全文
posted @ 2014-01-05 11:31 ~~Snail~~ 阅读(190) 评论(0) 推荐(0) 编辑
摘要: PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string"ABCDEDCBA"is a palindrome because it is the same when the string is read from left to right as when the string is read from right to left.A mirrored string is a s 阅读全文
posted @ 2014-01-05 10:44 ~~Snail~~ 阅读(210) 评论(0) 推荐(0) 编辑
摘要: OverflowWrite a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expression is too large to be represented as a ``normal'' signed integer (typeintegerif you are working Pascal, typeintif you are working 阅读全文
posted @ 2014-01-05 10:15 ~~Snail~~ 阅读(189) 评论(0) 推荐(0) 编辑