Here Size added before and after adding hash value to the root. as seen in the code size of child must not affect the result, here is the snippet of submission which result is WA
and here is the AC submission, rest of the code is same
here is link of AC submission ACCEPTED SUBMISSION
here is the link WA submission WA at test-68
Any help is welcomed,TIA
Just random (rng) things. Here is your WA submission that got AC. Sadly you cannot submit same code again on Codeforces.
WA: 196484386 $$$\newline$$$ AC: 196503481