Comments

Div 1 B (Div 2 D) was such a beautiful problem with fairly easy solution. Loved solving this contest.

Any hints for D Please.

I spent all my time considering that optimal answer will be only from a pair of elements, but my assumption is wrong.

Interesting question! The intentional use of odr instead of ord was a brain-teasing choice for me. It's a respectful tribute to the original author, whose solution inspired me to learn this :)

+9

Please Give Me Accepted :uwu:

Don't you think that's not fair?

In my opinion your current rating changes should not depend on your previous performances, rather It should be more intended towards the performance vs the current rating that you have (Like in case of codeforces).

I believe codeforces model is better, Because its frustrating to get stuck in the same range even after performing good in 2-3 codechef's contests. and I think that's the main reason why some people choose to use new Alts to give contests on codechef (which can also be clearly noticed in div4 standings lol. sometimes the most difficult question has same number of accepted in div1 and div4 and very less in div2 compared to both)

+11

I admit , the testcase were good too but me and i guess majority of us took too long to understand what's the question is saying.

+3

I think the problem setters skipped English lectures to study maths...

Problem B :( u all know why

and problem D was more of maths than programming.

I will try my best to explain what I did, So a few observations first, The permutation is 1,2,3,4....n 1) Number of subsequences starting from 'i' are n-i+1.

2) If we have a pair (1,2) that means that it includes all pairs (1,2),(1,3),(1,4)...(1,n) are included in it (because if we take any pair they will have (1,2) always). So if we have 2 inputs given as (1,2) and (1,4) so we can ignore (1,4) and take only (1,2) in consideration for calculation.

3) Now take a case like this we have only (2,3) as the pair, So when we consider subsequences starting from 1, They are: {[1],[1,2],[1,2,3],[1,2,3,4]}. Now as we have (2,3) as a pair we have to stop before 3. So we have to consider the effects of the number after 1 to get its stopping point.(once read code comments to be more clear)

4) if we only consider the pair (1,4), lets say n is 5. so the possible subsequences are 1,{1,2}, {1,2,3} == 4-1 {or b-a for a pair (a,b)}

Code With comments

Spoiler

Sorry If I complicated in explaining something.

0

I guess their is no need of the ordered set (policy based data structure), the normal set works just insert all pairs {a[i],i} where a[i]<i and iterate on the vector. delete the first value of set until becomes greater than a[i] and just add the size of set to answer

0

F can be done using sets also.

Spoiler
0

Can someone Explain the TLE for G on my solution. 163933925 I did a recursive memoization dp like recursive knapsack.

UPD- it worked after adding if(factor>=35)return 0; condition

C also :'(

Please share your approach for C.

:'(

According to me the hacking is open even after the contest ends for those who have rating greater than 1900. Your code has passed the the testcase provided by the contest writers but there maybe some testcase on which your solution may give Wrong Answer or Runtime Error or Time limit exceeded on which your code got hacked.

Later these hacking testcases gets merged with the system testcases, so if you will try to submit the same code after some time you may get WA or TLE.

I am not sure of the rating changes though, according to me they will be updated after all solutions are re-judged.

well i knew i'm gonna have -ve contribution so why not write from alt.

Array: 10 9 8 7 1 5 3 6 2 7 8 9 10

10 9 8 7 1 5 3 6 2 7 8 9 10

In reverse: 10 9 8 7 2 6 3 5 1 7 8 9 10

My Approach if u want to know
-41

probably coz i wanna be anonymous '◡'

-57

Don't you know anything about alt accounts?

-36

Yet another unbalanced round... #SpeedForcesOP