Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official. ×

MohamedAhmed04's blog

By MohamedAhmed04, history, 6 months 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

 
 
 
 

»
6 months 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