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 | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 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 ?
Название |
---|
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