Want an explanation

Правка en1, от dipta007, 2017-10-18 21:15:25

In the last CSAcademy Round 53, Problem Number C, My this submission gives me TLE

My TLE Code

But after the contest I have changed my code and submitted and that was accepted.

My Accepted Code

The change was on line 144 and 161. On the first code (TLE) I checked if the propagate value is not equal to 0 by the following code

if( tree[node].prop )

On the accepted code I checked the same thing by this following code:

if( tree[node].prop != 0 )

But I think there is no difference in the two codes. Please explain me if I am wrong.

I have already posted on CSAcademy. But haven't got any reply till now. So I posted here for getting more response. You can check my blog by the following link: My Blog on CSAcademy

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский dipta007 2017-10-18 21:18:11 41
en1 Английский dipta007 2017-10-18 21:15:25 888 Initial revision (published)