Betlista's blog

By Betlista, 12 years ago, In English

Hello coders,

I misundestood something in problem 69B and I do not know what. Some advice would be great.

I'm getting WA for 3rd testcase.

IMHO the "maximum possible profit" is to bet on 2. runner running 2. section (+10) and bet on 1. runner running 1. section (+1) => result is 11


Test: #3, ... verdict: WRONG_ANSWER
Input:
2 2
1 2 3 1
2 2 3 10

Output: 11
Answer: 2
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
12 years ago, # |
  Vote: I like it +1 Vote: I do not like it
On section 2, the two competitors take equal time to complete the section. However, the problem states that "In case of equality of times the athlete with the smaller index number wins.", so in this case competitor #1 would win over competitor #2, and you can only gain a profit of 1 dollar per section.