FLIPCOIN http://www.codechef.com/problems/FLIPCOIN

can any one help on segment trees ,how to use segment tree in this problem???

1 Like

read about segment trees with lazy propagation :slight_smile:

i tried a lot but can’t seem to implement it with this problem if you can help a bit more…

Try using arrays , instead of binary tree for constructing segment tree

@sakuag333 why we should use arrays instead of binary tree??kindly help… CodeChef: Practical coding for everyone …my soln of flipcoin using binary tree is giving right answer for sample test cases and random inputs but wrong answer on submission… Kindly help