Блог пользователя VIIIIIIVX

Автор VIIIIIIVX, история, 8 лет назад, По-английски

Hi. My submission for 734D - Anton and Chess got WA in test 19 in the contest. My submission in contest: 22243153 But today when I submit again that code it got AC. 22283030 What happend? Can you help me??

I just want to know what is between two code. Difference is just //. =/

UPD: Finally I found where is my mistake. I make an array in int main() function and It has some values from the beginning and I did not check them.

:/

Thank you very much. =D

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Your l contains garbage value. Declare it outside. Different invocations make l different garbage values sometimes having 'B' 'R' 'Q' etc.. hence if there is no point in that axis it will take that garbage value and test the condition.

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

the revisions of these two problems are different. I don't know what it means, but it's only explanation

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    What do you mean? The above two submissions are exactly the same except for a comment. There is undefined behavior in code due to local defined arrays which contains garbage value being tested in the end.