It was nice to watch "The Social Network" movie that is about how facebook has been created. I don't know how much it was accurate in depicting the truth but anyway it had a narrow view about what had happened.


Today I solved 6 problems and one of them was really awesome : Babaei and Birthday Cake

( I have written some hints about it's solution at bottom of the page )


Faraz solved his first Segment Tree problem and is working on improving his skill on it with solving more problems. Also he has became Expert  in last contest and I think it will motivate him more than before :)


But we really need to manage our time better than this , because i think we have many wasted time.


We went out today and had some fun with eating ice cream. Faraz fell down his ice cream very soon and he was watching us when we were eating :D it was nice day.



---------------------------------------------------------

Problem Solution : 

It is like LIS problem and I have used a method like that.

Also it is necessary to be good in Data structure . I solved it with 2 different DS , one with ordered_set and one with segment tree.