随笔分类 -  TopCoder

摘要:Problem StatementThe old song declares "Go ahead and hate your neighbor", and the residents of Onetinville have taken those words to heart. Every resident hates his next-door neighbors on both sides. Nobody is willing to live farther away from the town's well than his neighbors, so the 阅读全文
posted @ 2013-09-09 09:16 丶Blank 阅读(510) 评论(0) 推荐(0)
摘要:Problem StatementA sequence of numbers is called a zig-zag sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than two elements is trivially a zig-zag 阅读全文
posted @ 2013-09-05 23:08 丶Blank 阅读(854) 评论(0) 推荐(0)