摘要: E. LIS of SequenceThe next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For bet... 阅读全文
posted @ 2015-11-08 23:57 meekyan 阅读(279) 评论(0) 推荐(0) 编辑
摘要: D. Valid SetsAs you know, an undirected connected graph withnnodes andn - 1edges is called atree. You are given an integerdand a tree consisting ofnno... 阅读全文
posted @ 2015-11-08 23:51 meekyan 阅读(216) 评论(0) 推荐(0) 编辑
摘要: C. Palindrome TransformationNam is playing with a string on his computer. The string consists ofnlowercase English letters. It is meaningless, so Nam ... 阅读全文
posted @ 2015-11-08 23:46 meekyan 阅读(224) 评论(0) 推荐(0) 编辑
摘要: B. OR in MatrixLet's define logicalORas an operation on two logical values (i. e. values that belong to the set{0, 1}) that is equal to1if either or b... 阅读全文
posted @ 2015-11-08 23:41 meekyan 阅读(303) 评论(0) 推荐(0) 编辑
摘要: A. Calculating FunctionFor a positive integernlet's define a functionf:f(n) = - 1 + 2 - 3 + .. + ( - 1)nnYour task is to calculatef(n)for a given int... 阅读全文
posted @ 2015-11-08 23:39 meekyan 阅读(275) 评论(0) 推荐(0) 编辑