### Mr.ink's blog

By Mr.ink, 8 years ago,

I am learning segment tree with lazy propagation but i can't find good tutorial. Can anyone post a code that implements this two operation with segment tree and lazy propagation:

a-add a value to every element in a interval b-get the. sum of interval.

• +1

By Mr.ink, 8 years ago,

Can somebody help me with problem B of Div 1. I implement the solution of editorial but i get WA on test 5 and i can't debug the code. I think it's absurd. Here is the code: http://codeforces.com/contest/449/submission/7192350

• -8

By Mr.ink, 8 years ago,

Can somebody help me with problem B of Div 1. I implement the solution of editorial but i get WA on test 5 and i can't debug the code. I think it's absurd. Here is the code: http://codeforces.com/contest/449/submission/7192350 UPD: I found the problem http://codeforces.com/contest/450/submission/7193321

• -7

By Mr.ink, 8 years ago,

For problem 439D there is a ternary search solution that works very well but this is a ternary search on integers and it can go into an endless loop but the author of questions says it works correct.Why does this solution work?if hi = 3 , lo = 1 when answer is 2 ?The ternary search in this state can not reach 2. here is the code http://codeforces.com/contest/439/submission/6814294

• -15

By Mr.ink, 8 years ago,

I am trying to solv eproblem 442C I see other's code like http://codeforces.com/contest/442/submission/6971106 but i couldn't understand the logic of their code.I also read editorial of problem http://codeforces.com/blog/entry/12739
but i can not understand how it handle situations like 1 100 101 200 when the minimum is in the elements that we can not remove.