Bakry's blog

By Bakry, history, 7 years ago, In English

Why Wrong Answer in this Problem

I Solved it using Segment tree and lazy propagation

Problem Link : http://www.spoj.com/problems/CDC12_H/

My Solution Link : https://ideone.com/Td4sDM

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

fill lazy arry with zeroes every test,you don't need build function just fill tree array with zeroes every test ,replace cin,cout with scanf,printf to avoid time limit