Comments

I do not know what you mean by patterns, but I would say <= 1500 are often based on 'observations', which usually do not conform to any existing pattern. (well unless you break down the problem a bit then you can identify some patterns you may know but that's a byproduct of solving the problem)

These observations are at all rated ranges, become harder to grab on to, and tougher to accept because instead of being simple intuitive observations they start being somewhat non-intuitive and reliant on proofs.

I would say till 1900 one doesn't have to worry too much about proofs but more about making critical observations, although it is good practice to prove later during upsolving.

Feel free to correct me.

It would be a nice idea on any other platform but considering how badly a round gets downvoted just because people didn't enjoy the tasks (and during those times the author also remains hidden in editorial), I would be a little worried about what would happen if such people got to know the authors.

Problem H can use Kadane in a nice way.

Notice that the sum over frequencies of distinct elements is the size of our input array.

We know any subarray endings should be at two elements that have the same value, otherwise, we are pointlessly reducing our answer and we can fix our boundaries to be on the same boundaries.

say if we have XXXLXXXRXXX where [L, R] is the subarray we are considering then there is no point in having the left or right boundaries on Xs since we could improve the sum by restoring boundaries to L and R.

We can make an array of positions for each distinct element and use the observation that the Xs can be compressed together, therefore for each distinct element, such a compression yields a size of array twice the array of all positions for that element.

So our solution boils down to making a compressed array for each distinct element and then applying kadane to it, finally taking the one which gives the maximum answer.

Time complexity is still the order of n as we are effectively applying kadane on twice the input size.

Prime gap is how I came up with it.

Someone make a blog for osu! as well. A lot of high rated CF users are decently ranked on osu! too.

On huangziruiCodeforces Round #796, 2 years ago
0

As a Touhou fan who has never played Touhou before . Although, I did play once. I hope to get back at it someday :D

I am looking forward to the round!

it's a swap so between any two indices so it won't take more than n steps. (unless I get hacked)