yabhist's blog

By yabhist, history, 2 hours ago, In English

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)

jiangly 221116632 output : 27

tourist 221110018 output : 22

I think the correct answer should be 27, which is what jiangly's code outputs. Correct me if I am wrong.

  • Vote: I like it
  • -17
  • Vote: I do not like it

»
2 hours ago, # |
  Vote: I like it +19 Vote: I do not like it

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

  • »
    »
    117 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why is this test case not within constraints?

    • »
      »
      »
      112 minutes ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      $$$a_{i}<b_{i}$$$

      • »
        »
        »
        »
        109 minutes ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Ok got it

    • »
      »
      »
      111 minutes ago, # ^ |
        Vote: I like it 0 Vote: I do not like 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.

      • »
        »
        »
        »
        86 minutes ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Yes, Actually I made the test case after reading the editorial of the problem which doesn't consider this constraint.