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 | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 142 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
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 |
|---|


