Segment Tree Troubles

Правка en1, от conqueror_of_conqueror, 2016-07-28 04:39:02

Hello friends! I have tried to solve the 343D problem using a Segment Tree. When I submitted with the upper limit on the arrays of 4*MAX, it ended up with WA Test 10. Somehow, I was able to "fix" the code by changing the upper limit on the array to be 8*MAX instead of 4*MAX. Can anyone explain why this would result in a different answer (and why there is no index out of range (or some RE) when using 4*MAX)? Thanks for your help!

Submission for 4*MAX (WA): http://mirror.codeforces.com/contest/343/submission/19451573

Submission for 8*MAX (AC): http://mirror.codeforces.com/contest/343/submission/19451700

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский conqueror_of_conqueror 2016-07-28 04:39:02 675 Initial revision (published)