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 | jiangly | 3976 |
2 | tourist | 3815 |
3 | jqdai0815 | 3682 |
4 | ksun48 | 3614 |
5 | orzdevinwang | 3526 |
6 | ecnerwala | 3514 |
7 | Benq | 3482 |
8 | hos.lyric | 3382 |
9 | gamegame | 3374 |
10 | heuristica | 3357 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | -is-this-fft- | 165 |
3 | Um_nik | 161 |
4 | atcoder_official | 160 |
5 | djm03178 | 157 |
6 | Dominater069 | 156 |
7 | adamant | 154 |
8 | luogu_official | 152 |
9 | awoo | 151 |
10 | TheScrasse | 147 |
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