how to solve funny marbles by BIT (Fenwick trees)

@yashkumar18 i have one doubt…i initialised ft[0…n]=0 as it is required…now unitialised it and still got an AC.How?

Because when delcared globally, all elements =0 already :wink: , but not so when declared inside main, see this → Nc7pzo - Online C++0x Compiler & Debugging Tool - Ideone.com , VMK4SE - Online C++0x Compiler & Debugging Tool - Ideone.com

great :slight_smile: :slight_smile:

Thanks a lot :slight_smile:

http://discuss.codechef.com/search/?csrfmiddlewaretoken=9a037e1291bfa6be127faf6cae1c63d4&q=dec13&t=question

1 Like