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 ?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3839 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | Geothermal | 3569 |
7 | cnnfls_csy | 3569 |
9 | ecnerwala | 3494 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | Um_nik | 164 |
2 | maomao90 | 160 |
3 | -is-this-fft- | 159 |
4 | atcoder_official | 158 |
4 | awoo | 158 |
4 | cry | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | TheScrasse | 152 |
10 | maroonrk | 151 |
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 ?
Название |
---|
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