https://codeforces.me/problemset/problem/1915/G https://codeforces.me/contest/1915/submission/306582571
What am I missing?!
Any Help would be deeply appreciated!
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3857 |
2 | jiangly | 3747 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3591 |
6 | gamegame | 3477 |
7 | Benq | 3468 |
8 | Radewoosh | 3463 |
9 | ecnerwala | 3451 |
10 | heuristica | 3431 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 166 |
2 | -is-this-fft- | 161 |
3 | Qingyu | 160 |
4 | Dominater069 | 158 |
5 | atcoder_official | 157 |
6 | adamant | 155 |
7 | Um_nik | 152 |
8 | djm03178 | 151 |
9 | luogu_official | 150 |
10 | awoo | 148 |
https://codeforces.me/problemset/problem/1915/G https://codeforces.me/contest/1915/submission/306582571
What am I missing?!
Any Help would be deeply appreciated!
Название |
---|
Maintain distance vector of n*1000 size like u maintained a visited vector .. Visited vector has no use , Link My submission for reference
2d distance vector
I appreciate,
But I would like to know, why my solution fails ?!
Any counter test case that you can think of ?!
See it like this speed and node are two changing parameters in priority queue so we need to memoise both of them .. Like a case where u reach a particular node but with a different bicycle ( u are using visited vector for that ..but it could be possible we are coming there with a better ans than before) .. another parameter slowness factor of bike is not accounted in ur distance vector
I think, but it could be possible we are coming there with a better ans than before seems wrong to me, as we are processing that node with that particular bicycle, then it is not possible to meet that node with the same bicycle and lesser distance.
And if it is even possible, my answer is lesser than jury, that's another puzzle.
It is possible that we visit the same node with same slowness ..but a better distance later
Why are u doing minimum slowness from 1 to i .. We have to take minimum as we push in queue
Any simple counter for my first statement, or a proof to counter it ?!
And I think you are getting 2 wrong.
Just use bruteforce, it runs faster than you think