摘要:
There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say t 阅读全文
摘要:
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ag 阅读全文
摘要:
You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible 阅读全文
摘要:
思路:这道题无法用平时0(n^2)的解法来求最长上升子序列,会超时,只能用优化的最长上升子序列算法来求 You are given a problemset consisting of nn problems. The difficulty of the ii -th problem is aiai 阅读全文
摘要:
思路:这道题要重复数字的下标存起来,把没出现过的数字标记起来并且存起来,然后再把重复的数字换成没出现过的(没出现过的数字的数量 = 重复数字的数量) Companies always have a lot of equipment, furniture and other things. All o 阅读全文
摘要:
Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a wel 阅读全文
摘要:
You are given a string tt consisting of nn lowercase Latin letters and an integer number kk . Let's define a substring of some string ss with indices 阅读全文