摘要: 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] … h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的;2、左右对称, 阅读全文
posted @ 2019-08-04 14:24 Xxiaoyu 阅读(204) 评论(0) 推荐(1) 编辑
摘要: Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, “Can you propose an 阅读全文
posted @ 2019-08-04 14:18 Xxiaoyu 阅读(208) 评论(0) 推荐(1) 编辑
摘要: There are n men ,every man has an ID(1…n).their ID is unique. Whose ID is i and i-1 are friends, Whose ID is i and i+1 are friends. These n men stand 阅读全文
posted @ 2019-08-04 14:16 Xxiaoyu 阅读(389) 评论(0) 推荐(1) 编辑
摘要: Alice and Bob has just learned how to find average of some numbers. They got really excited anddecided to come up with a game about finding average. T 阅读全文
posted @ 2019-08-04 14:11 Xxiaoyu 阅读(186) 评论(0) 推荐(1) 编辑