Try:

=IF(A2=MAX(IF($C$2:$C$10=C2,$A$2:$A$10)),"X","")

confirmed with CTRL+SHIFT+ENTER and copied down