i read the tutorial and other solutions on the internet but none of them described the lazy propagation , it seems a little bit complicated anyone ?
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
i read the tutorial and other solutions on the internet but none of them described the lazy propagation , it seems a little bit complicated anyone ?
Name |
---|
task is here
i don't understand why this comment is downvoted so much. SEFI2 has just provided a link to statement of the problem mentioned in OP.
EDIT: comment now has +7. :)
Look up the solution for UVa 11402 Ahoy Pirates. That's what worked for me...
http://nminhtu94.blogspot.com/2012/12/uva-11402-ahoy-pirates.html
http://ajmarin.alwaysdata.net/codes/problems/1274/
http://lbv-pc.blogspot.com/2012/10/ahoy-pirates_24.html etc
EDIT: Not sure if you were looking for a detailed solution for the problem. If you did, I feel like after understanding the technique behind Ahoy, Pirates, you'll be able to figure out the solution for 'wall' yourself.
thnx alot
It's a rather complicated tree problem. At each node you need two values: down and up (the height when you call type 2 operation and type 1 operation, respectively).
Perhaps the code will be clearer than the explanation. Here --> C++ code
thnx alot