jeqcho's blog

By jeqcho, history, 4 weeks ago, In English,

I wasn't expecting this.

Even though the output and answer values for the first row is the same (beauty value = 21), the judging environment gave me an error stating that my code outputted '20' for the first row although the log shows that my output is 21! The problem is 1114B. See attached image for more details.

Is this a bug or did I miss something?

Thanks, Jeqcho

 
 
 
 
  • Vote: I like it  
  • +3
  • Vote: I do not like it  

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by jeqcho (previous revision, new revision, compare).

»
4 weeks ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

it means that the beauty of the values you printed is only 20?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I believe that I have found the explanation!

The judgement protocol states it found 20 because the arrays that I sliced into (4,6) returns a beauty value of 20, even though my first answer (predicted beauty) is correct! The judgement system runs through my given arrays and sum up the beauty values and got 20, that is why it says it found 20 even though I gave 21 as my answer- because my given indexes are incorrect! Sorry for asking such a trivial question :)

Thanks

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah, it's precisely what the checker message is trying to say: in your output, the claimed answer (number) is 21, but the certificate (line after the first number) has a different answer.