First of all, it is impossible for Contrary Serperior and Malamar to exist in the same Generation, so it means whichever Generation you're playing, you only have one option out of the two. They are still comparable though, so I will.
Serperior's main and probably only use for Contrary is Leaf Storm, boosting its Special Attack stat by two stages each time it successfully hits. This, coupled with good Speed makes it a dangerous sweeper. It has decent Defensive stats too, although HP could be better.
Malamar's use for Contrary is Superpower, which is basically a 120 base power move that has the added effect of Bulk Up. A small downfall is that Malamar doesn't receive STAB from Superpower, unlike Serperior with Leaf Storm. Malamar can be a just as dangerous sweeper as Serperior though, its Defenses are a bit lackluster, but not pathetic(its 2x weakness to Bug isn't helping it though). Specially Defensive sets can be effective, because it can still sweep with the boosts from Superpower. It lacks a reliable recovery move though, which can make it a bit hard to pull off. A pro to Malamar is the better attack stat.
Overall, I believe Serperior is the superior user of Contrary, for its outright power with Leaf Storm, even with base 75 Special Attack, after boosts Leaf Storm is so powerful its ridiculous.
It also has better Defenses than Malamar, a lack of a 2x weakness, allowing it to take more hits, not having to rely on boosts. It can even run a bulky sweeper set.