I have problem with that problem http://codeforces.me/contest/459/problem/E
Could someone please help me to find my fault, it gives wrong answer on test 36
I solved it with dp here is my solution link
Thanks in advance.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
I have problem with that problem http://codeforces.me/contest/459/problem/E
Could someone please help me to find my fault, it gives wrong answer on test 36
I solved it with dp here is my solution link
Thanks in advance.
Название |
---|
your code gives wrong answer for this test: 8 7 1 2 1 2 3 2 3 4 3 4 5 4 4 6 3 6 7 4 7 8 5 pay attention when you sort an array of pairs if first elements were equal it sorts them according to the second element. in your code when two edges have equal wi then it add the edge which has bigger uito the current graph and it may cause problem like the example I told!
i meant w [i] and u [i] in my previous comment which they are equal to v [i].ff and v [i].sf in your code. :)