september challange

weaseltx

#1

I dont understand whats wrong with my code its the brute force solution , i have commented the code can someone help me find what i am doing wrong .It works for the sample test case though.

link to the question

link to the solution solution


#2

More importantly, why are sub-tasks hidden for this one?


#3

yeah i dont understand why they decide to hide sub-taskā€¦ maybe a bug?


#4

ITwas reported earlier by @meooow as well. PErhaps your problem passes some subtask but is getting WA due to larger tasks. Its hard to debug this way.


#5

Sad but do u think that the solution is correct though?


#6

Where did you update the value of rest of the nodes? Each and every node undergoes change in value daily, by forumula new value= old value ^(xor of values of all its children)?

Well, I asked cause I couldnt find it XD (Not a python user), but ofc if you passed I/O you must have done it somewhere.


#7

i did update them every day recursively for all node line 10

value[index]=ans