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.
# | User | Rating |
---|---|---|
1 | tourist | 3727 |
2 | Um_nik | 3592 |
3 | jiangly | 3587 |
4 | slime | 3544 |
5 | Benq | 3513 |
6 | MiracleFaFa | 3466 |
7 | greenheadstrange | 3393 |
8 | xtqqwq | 3382 |
9 | Radewoosh | 3379 |
10 | maroonrk | 3358 |
# | User | Contrib. |
---|---|---|
1 | awoo | 188 |
2 | -is-this-fft- | 187 |
3 | YouKn0wWho | 182 |
4 | Um_nik | 179 |
5 | Monogon | 178 |
6 | antontrygubO_o | 173 |
7 | maroonrk | 165 |
8 | adamant | 164 |
8 | SecondThread | 164 |
10 | SlavicG | 163 |
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.
Can anyone explain me problem C ELECTRIFICATION from Educational Codeforces Round 66 (Rated for Div. 2). My doubts are from the tutorial are: 1. Since we need the dk+1 distance that means we should minimize distance to k+1 points so why we are looking over k points . 2. How they got the expression for f(x). The problem statement is https://codeforces.com/problemset/problem/1175/C and tutorial link is https://codeforces.com/blog/entry/67484
Name |
---|