Комментарии

its like fibonacci without memoisation, you are calculating for a state (lets say 10) multiple times, (20 -> 10 or 19 -> 20 -> 10), consider memoisation instead which stores the result of some visited state, and there will be O(log(1e18)) such numbers

Code

I read the editorial

and the code is written to handle the points before and after (a-1 and b+1 (where a and b are compressed coordinates) ) which i am not doing, could anyone please explain why is it so

my approach is to simply compress all , now we can say that from point a to b, the total c values remains same. i cant find my mistake.

На Ashishgup → I'm Ashishgup. Ask me anything!, 6 лет назад
0

but i dont see any chemical equations there

На Ashishgup → I'm Ashishgup. Ask me anything!, 6 лет назад
-6

thanks for the reply, i have 2 final questions

  1. What is your strategy of upsolving, do you try on your own for some time or directly read the editorial.

  2. this is the most imp quetion, why do cp even after getting a job, i know it sounds silly but i graduated in 2019 and doing it because its fun but i am sometimes confused why do it, i mean what is the motivation so that i CAN IMPROVE because i can continue half heartedly too but its a time waste until and unless i improve.

edit : i meant less rated , this is my alt unrated account.

This is the best club and the best series of tutorials with comprehensive explanations, better than all the youtube channels out there. PERIOD. (since its a coordinated effort by good programmers). kudos to the efforts you guys put in making the videos.

На Ashishgup → I'm Ashishgup. Ask me anything!, 6 лет назад
+13

hi ashishgup, I am a big fan, my level is currently 1630 and max rating of 1735. what would you suggest to reach 1900 rating.The catch is that i have given more than 80 contests but still unrated. I also rarely upsolve ( maybe that is one thing i can work upon too. )

I couldn't understand F , could anyone explain please.

i mean what is the dp state if it is a dp related problem