摘要: 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 @ 2017-04-11 12:06 joeylee97 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的; 2、左右 阅读全文
posted @ 2017-04-11 11:50 joeylee97 阅读(177) 评论(0) 推荐(0) 编辑