When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Prabal08's blog

By Prabal08, history, 4 years ago, In English

Problem Link https://www.codechef.com/problems/ADDMUL

I wanted to understand how to handle addition and multiplication queries simultaneously. Though I read the editorial, I could not understand how to propagate lazy updates to the child nodes.

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

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you mind try reading my solution?

https://www.codechef.com/viewsolution/41782975

Hopefully the documentation that I put helps. Do let me know if it doesn't.