States can do that if they choose to. Nebraska and Maine have implemented the exact system you’ve described.
Had it been in place in 2012 Romney would have won, barely.
http://www.polidata.org/prcd/