Why does this test case gives different answers for jiangly and tourist codes submitted for problem 1863E - Speedrun during the contest Pinely Round 2 (Div. 1 + Div. 2) although both were accepted.
1
11 10 15
2 12 9 8 11 14 12 8 10 5 11
5 2
5 3
2 4
3 4
1 3
1 6
1 7
6 8
9 10
9 11
(This test case is generated by me and not used for judging)
I think the correct answer should be 27, which is what jiangly's code outputs. Correct me if I am wrong.
Bro if you ever think tourist is wrong and decide to make a blog about it, just calm down take a step back and try to find out why YOU are wrong.
Check the constraints again
Why is this test case not within constraints?
$$$a_{i}<b_{i}$$$
Ok got it
All of the dependencies have to satisfy $$$a_i<b_i$$$, so 5 2 is not a valid dependency, despite it occuring in your test case.
Yes, Actually I made the test case after reading the editorial of the problem which doesn't consider this constraint.