Archazey's blog

By Archazey, 9 years ago, In English

Hey,I took part in round 292 div 2 and luckily I got a good place (for me) ,and this is 246. But sadly when I looked 1 hour ago on rating update,I saw that my rating was lower,and it says that I took place 500+ as you can see on my profile. Here is my proof : http://tinypic.com/view.php?pic=3538l8k&s=8 , or you can look on standings page 3 (places ranging from 200 to 299). I want to know if anyone has ever had this problem and if this can be solved... Thank you :D

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it

By Archazey, 9 years ago, In English

Hello,i have a question concerning lazy update.This question is generally for every lazy update use. When i mark some node with a flag,i don't actually update it,i just mark it.So a node with a mark on it isn't updated.

When I "go down" on some son and see that my node is marked,that's when I update it and give the mark to the sons.It seems more easier than me.This way i have to be sure that when I "go up" in my recursion and update my node with the value of the sons,the sons may not actually be updated,so I need to make sure they are.This takes more time,that's why I think this approach is slower than the other.

Here is my code for this problem http://www.codechef.com/viewsolution/5672423.

I also tried the other approach,when I mark a node and update it.It seems faster but not so pretty for me to implement. What is your version of implementing lazy update?Please let me know :)

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it