The trick to this is that the "contradiction" only accounts for some of the force. It only accounts for the pressure on the base by the fluid. But what about the force on the walls? The walls are clearly holding the fluid in, and they can only do that through a reactionary force: the pressure of the liquid pushing out (normal to the wall) is countered by the force of the wall pushing back in.
If you do a free body diagram on the walls, you will see that in A, the pressure from the mercury is pushing slightly downward, and the wall is pushing upwards on the mercury. To stay in place, that means the wall must be held up by something: the base. There's downward force in A because the walls are holding up some of the mercury, not just the base. If you accounted properly for this extra pressure, you would see that the weight of A is the greatest.
C is the nice easy boring case. The pressure pushes outwards on the wall, so it doesn't transmit any forces downward.
B is a curiosity. By this argument, the walls are pulling up! Logically, this makes sense, because there's less mercury in B than C, but they have the same base area and pressure. Thus the pressure on the base for the two cases must be the same, the only logical solution is for the walls to be pulling up! Indeed, the free body diagram will show that.
To make that intuitive, hold your left hand at an angle, as though it was the wall of B. I found the visual works well if we exaggerate and hold our hand with the tips of the fingers pointing right and up at a 45 degree angle. Think about what direction the pressure must be applied on the walls, and use your right hand to push on the bottom knuckle of your hand as though it were fluid pressure trying to push outwards on the container. This force must naturally be up and leftward at a 45 degree angle. If you push like this, you will notice that your entire hand wants to lift up (this effect is even more pronounced if you let your hand bow a bit, like the walls of a cheap thin container). Indeed, if you want to keep your left hand in place, your wrist has to hold the hand down -- the hand is pulling UP on the wrist!
Nice problem by the way. I like problems where they give you two logical but contradictory answers and you have to resolve the contradiction.