### taratam's blog

By taratam, 8 years ago,

• 0

 » 8 years ago, # |   +6 Give a better title to this blog. CodeChef has thousands of problems, should we have thousands of blogs with same title?
 » 8 years ago, # |   0 segment tree lazy propagation. struct Value { int sum[3]; void Increase() { int t = sum[2]; for (int i = 1; i < 3; ++i) sum[i] = sum[i - 1]; sum[0] = t; } Value operator + (Value b) { Value res; for (int i = 0; i < 3; ++i) res.sum[i] = sum[i] + b.sum[i]; return res; } }; 
•  » » 8 years ago, # ^ |   0 I solved it :) 10x