上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 66 下一页
摘要: B. Word CutLet's consider one interesting word game. In this game you should transform one word into another through special operations.Let's say we h... 阅读全文
posted @ 2016-01-21 14:50 meekyan 阅读(441) 评论(0) 推荐(0) 编辑
摘要: Rock-Paper-ScissorsNikephoros and Polycarpus play rock-paper-scissors. The loser gets pinched (not too severely!).Let us remind you the rules of this ... 阅读全文
posted @ 2016-01-21 00:12 meekyan 阅读(277) 评论(0) 推荐(1) 编辑
摘要: RecurrencesConsider recurrent functions of the following form:f(n) = a1f(n − 1) + a2f(n − 2) + a3f(n − 3) + . . . + adf(n − d), for... 阅读全文
posted @ 2016-01-20 23:44 meekyan 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Modular FibonacciThe Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...) are defined by the recurrence:F0 = 0F1 = 1Fi = Fi−1 + F... 阅读全文
posted @ 2016-01-20 22:40 meekyan 阅读(440) 评论(0) 推荐(0) 编辑
摘要: Silly SortYour younger brother has an assignment and needs some help. His teacher gave him a sequence ofnumbers to be sorted in asc... 阅读全文
posted @ 2016-01-19 21:32 meekyan 阅读(493) 评论(0) 推荐(0) 编辑
摘要: Find the PermutationsSorting is one of the most used operations in real life, where Computer Science comes into act. It iswell-known that... 阅读全文
posted @ 2016-01-19 18:14 meekyan 阅读(278) 评论(0) 推荐(0) 编辑
摘要: PolygonJohn has been given a segment of lenght N, however he needs a polygon. In order to create a polygonhe has cut given segment K... 阅读全文
posted @ 2016-01-19 18:05 meekyan 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 爱管闲事春希非常爱管闲事,他每天都会抽空帮助一些同学,由于春希非常死板,出于公平性,春希不会先帮助后来找他的同学。现在有n个同学需要他的帮助,虽然他很想一天之类帮助所有人,但毕竟精力有限,于是他决定分m天来帮助他们。根据事情的重要性,春希帮助不同同学会有不同的快乐值,而春希获得的总的快乐值为每天获得... 阅读全文
posted @ 2016-01-18 14:48 meekyan 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Bonnie and ClydeDescriptionBonnie and Clyde are into robbing banks. This time their target is a town called Castle Rock. There are n banks located alo... 阅读全文
posted @ 2016-01-17 20:47 meekyan 阅读(306) 评论(0) 推荐(0) 编辑
摘要: F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ... 阅读全文
posted @ 2016-01-16 21:19 meekyan 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 66 下一页