Topological Sort

Score: 199.42 (pass)

its just not human to go below the 100 mark.. how in the world did they do it? ;)

#!perl
while(<>){($p,$s)=split;$h{$s}.="\"$p\""if$p ne$s;$h{$p}.="";}$c=@k=keys%h;while(@k){$k=shift@k;if($h{$k}eq""){$c=@k;print"$k\n";map{$h{$_}=~s#"\Q$k\E"##g}@k;}else{push@k,$k;last if$c--<0;}}exit($c);