Hello everyone ! Please help me to solve these problems from lightoj.com : 1083 1135 1424 Thank you for your attention.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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.