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 | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
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