VIIIIIIVX's blog

By VIIIIIIVX, history, 10 years ago, In English

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

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

| Write comment?
»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
10 years ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

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.

»
10 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    10 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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.