Hello everyone ! Please help me to solve these problems from lightoj.com : 1083 1135 1424 Thank you for your attention.
# | User | Rating |
---|---|---|
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 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hello everyone ! Please help me to solve these problems from lightoj.com : 1083 1135 1424 Thank you for your attention.
Name |
---|
The histogram problem can be solved easily with a stack. We push the first value to the stack. Then we push the second one etc etc. If the value that we want to push to the stack is less than the one that is on top of the stack, we dont push it and we pop values until the value on top of the stack is less than the one that we want to push. With this information you should be able to figure out the details yourself.
The second problem can be solved with a segment tree with lazy propagation. At every node you keep the number of numbers in the interval that are 0 mod 3,1 mod 3 and 2 mod 3. Try to figure out the updates yourself.
Thank you very much! I've got it.
The third problem with the king and prince can be solved like the first histogram problem. We will go row by row. Every row is the starting axis of the histogram and the values in the histogram are how many consecutive cells are above me, that doesnt contain any rocks. Then the problem is reduced to N or M histograms.
Could you suggest some problems that you solved in lightoj and found challenging?
I'm sorry, but I've solved only 10 problems. And all of them not hard.
What was your approx. rating when you asked this help? Just curious to know.