欢迎访问我的个人网站==》 jiashubing.cn
摘要: Even ParityWe have a grid of sizeNxN. Each cell of the grid initially contains a zero(0) or a one(1).Theparityof a cell is the number of 1s surrounding that cell. A cell is surrounded by at most 4 cells (top, bottom, left, right).Suppose we have a grid of size4x4:1010The parity of each cell would be 阅读全文
posted @ 2013-07-18 21:05 贾树丙 阅读(306) 评论(0) 推荐(0) 编辑
摘要: GraveyardProgramming contests became so popular in the year 2397 that the governor of New Earck -- the largest human-inhabited planet of the galaxy -- opened a special Alley of Contestant Memories (ACM) at the local graveyard. The ACM encircles a green park, and holds the holographic statues of famo 阅读全文
posted @ 2013-07-18 20:45 贾树丙 阅读(354) 评论(0) 推荐(0) 编辑
摘要: Piotr's AntsTime Limit: 2 secondsPiotr likes playing with ants. He hasnof them on a horizontal poleLcm long. Each ant is facing either left or right and walks at a constant speed of 1 cm/s. When two ants bump into each other, they both turn around (instantaneously) and start walking in opposite 阅读全文
posted @ 2013-07-18 15:33 贾树丙 阅读(746) 评论(0) 推荐(0) 编辑
摘要: Spreading the WealthProblemA Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to coins of equal value, such that the total number of coins is divisible by the number o 阅读全文
posted @ 2013-07-18 15:11 贾树丙 阅读(718) 评论(0) 推荐(0) 编辑
摘要: Exploring PyramidsArchaeologists have discovered a new set of hidden caves in one of the Egyptian pyramids. The decryption of ancient hieroglyphs on the walls nearby showed that the caves structure is as follows. There arencaves in a pyramid, connected by narrow passages, one of the caves is connect 阅读全文
posted @ 2013-07-18 14:04 贾树丙 阅读(301) 评论(0) 推荐(0) 编辑