摘要:
E. LIS of SequenceThe next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For bet... 阅读全文
摘要:
D. Valid SetsAs you know, an undirected connected graph withnnodes andn - 1edges is called atree. You are given an integerdand a tree consisting ofnno... 阅读全文
摘要:
C. Palindrome TransformationNam is playing with a string on his computer. The string consists ofnlowercase English letters. It is meaningless, so Nam ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文