摘要:
题目 贪心+二分 很容易将这道题转化为求最长递增子序列。这道题n的范围比较大,O(n^2)的时间复杂度会超时,所以不能使用dp,而应该用贪心+二分。唯一的难点在于xi等于xj该怎么办。 public class Main { public static void main(String[] args 阅读全文
摘要:
spilt方法作用 以所有匹配regex的子串为分隔符,将input划分为多个子串。 例如: The input "boo:and:foo", for example, yields the following results with these expressions: Regex Result 阅读全文