Topological Sort

Score: 133.52 (fail)

#!perl -lna
for(@F){$_=$h{$_}||=bless[$_]}
push@{$F[0]},$F[1]if($F[0]!=$F[1]);
DESTROY{print$_[0][0];grep(!$_,@{$_[0]})&&exit 1;}
END{%h=()}

Score: 141.51 (fail)

#!perl -lna
for(@F){$h{$_}||=bless[$_]}next if($F[0]eq$F[1]);push@{$h{$F[0]}},$h{$F[1]};DESTROY{print$_[0][0];grep(!$_,@{$_[0]})&&exit 1;}END{%h=()}

Score: 151.46 (pass)

Initial what-the-hey solution, just to get something in there.

#!perl -lna
$M{$F[0]}||={};@{$M{$F[1]}}{@F}=1;END{while(keys%M>0){($n)=grep{keys%{$M{$_}}<=1}keys%M or die;print$n;delete$M{$n};map{delete$_->{$n}}values%M;}}

Score: 152.56 (fail)

#!perl -lna

for(@F){$_=$h{$_}||=bless[$_]}
push@{$F[0]},$F[1]if($F[0]!=$F[1]);

DESTROY{
        print$_[0][0];
        grep(!$_,@{$_[0]})&&exit 1;
}

END{%h=()}