After taking a peek at the editorial, it looks like pretty much the same thing they are saying so I am not sure what I am missing at the moment.
A quick summary of my current logic as attached above:
Logic
# | 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 | 170 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 160 |
5 | djm03178 | 158 |
5 | -is-this-fft- | 158 |
7 | adamant | 154 |
7 | Dominater069 | 154 |
9 | awoo | 153 |
10 | luogu_official | 152 |
Help on WA for problem Moscow Gorilla
After taking a peek at the editorial, it looks like pretty much the same thing they are saying so I am not sure what I am missing at the moment.
A quick summary of my current logic as attached above:
Count number of ways to make MEX i for i in range [1,n+1]:
a) Only one way to make n+1
b) To make MEX 1, if l and r are min and max of locations of 1 in the two arrays, you must choose from range [1,l), (l,r), or (r , n] ( 1 indexed )
c) For every MEX ( other than 1 or n+1 ), keep track of the range of the previous MEXes (l and r unions of previous mexes) and find points such that l and r of previous mexes do no coincide with l and r of current number. Then merge the ranges!
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en3 | SriniV | 2023-06-24 06:51:37 | 26 | Tiny change: 'ary of my current logic as attached above:\n\n<spoi' -> 'ary of my logic:\n\n<spoi' | ||
en2 | SriniV | 2023-06-24 06:51:02 | 63 | Tiny change: 'ubmission:[submissio' -> 'ubmission: [submissio' | ||
en1 | SriniV | 2023-06-24 06:50:24 | 816 | Initial revision (published) |
Name |
---|