Problem link: https://codeforces.com/contest/1621/problem/G I first started with a simpler subproblem: some properties of all increasing subsequences up until i, more specifically, the number of unique sequences and the sum of the length of them. It’s not hard to see we can solve this by some tree structure. (i.e., if before i, the number of unique… Continue reading Codeforces Hello 2022: Weighted Increasing Subsequences