Hi everyone, I am recently solving this problem and my code is here. Can anyone tell me why i can not pass the 9th test ? thank you so much !!!
Hi everyone, I am recently solving this problem and my code is here. Can anyone tell me why i can not pass the 9th test ? thank you so much !!!
| # | 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 | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Name |
|---|



Your Dijkstra is implemented wrong:
It's possible that for any given vertex $$$v$$$ and horse thing $$$half$$$, multiple triples $$$(dist, v, half)$$$ get pushed into the priority queue — the cheapest one and ones that the algorithm discovered before that. Each of these triples is eventually popped from the priority queue, and thus for each vertex, we look at its outgoing edges many times, not just once as Dijkstra is supposed to work.
Omg thank you so much. I can now finally solved the problem with my own code xD.