I solved the problem by a simple observation:
If A accuses B of being a parasite, then even if it isn’t given that B accuses A of being anything, we’ll still consider that B accuses A being a parasite, and add the required edges in the graph.
SImilarly, if A accuses B being a human, then add an edge for B accusing A to be human.
Now, we’ll build a graph according to above relations. And see if there is any valid combination for each connected component, and if there are multiple we’ll consider the one which gives maximum number of parasite.
You may look at my solution - KbQhn5 - Online C++0x Compiler & Debugging Tool - Ideone.com in case you are stuck