Here is Problem Link i read its editorial but unable to understand it would anyone like to make me understand this problem ?
# | 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 |
Here is Problem Link i read its editorial but unable to understand it would anyone like to make me understand this problem ?
Name |
---|
Did you mean "understand its editorial"?
I haven't understood the editorial, but I have another idea for you, and it may be shorter! :)
When you are at the i-th click, let L be the length of the previous consecutive "O"s block. If the i-th click is bad, your score increases 0, otherwise it increases (L+1)^2-L^2=2L+1.
We will canculate the expected score each click "gives". The answer to the problem is the sum of all expected score. For the i-th click, let X be the expected length of the previous consecutive "O"s block (after i-1 clicks). The expected score this click gives is p*(2*X+1), where p is the probability that the click will be correct. Then, the expected length X after this click changes to p*(X+1).
See my submission 7665345 for more information.
I hope you will understand it. Thanks for your attention :D