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 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
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 |
|---|


