Problem: 1868B2 - Candy Party (Hard Version)
The easy version wants every person to send and receive, we can model the problem to be a graph problem where powers of $$$2$$$ are the nodes, and persons are the directed edges between the required power of $$$2$$$ to send and the required power of $$$2$$$ to receive. So, we can always have the cycles of persons by the fact that Eulerian circuits exit.
Here is a comment on the editorial that explains it more precisely.
But in the hard version, what is the proof that we can always have cycles or paths of persons when some will only send or receive?!