#!/usr/local/bin/perl -w # shu2m.p written for the code 16383.14197 from shu lin # shu2m.p < GHC/16383.14197 > GHC/16383.14197.A # eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; $N=16383; $M=$N; $t=128; $tr=128; print "$N $M\n" ; print "$t $tr\n" ; # print n copies of t then m copies of tr for ( $n = 1 ; $n <= $N ; $n ++ ) { print $t," " ; # $upto[$n] = 0 ; } print "\n" ; for ( $m = 1 ; $m <= $M ; $m ++ ) { print $tr," " ; } print "\n" ; print STDERR "writing body... " ; # flush (STDERR ); $m=0; while($_ = <>){ $m ++ ; @n = split ; for ( $u = 0 ; $u <= $#n ; $u ++ ) { $n[$u] ++ ; # correct for zero offset # $upto[$n[$u]] ++ ; # $u = $upto[$n[$u]] ; $nlist[$n[$u]] .= "$m\t" ; # add this ROW to the present COLUMN } # $row[$m] = join( ' ' , @n ) . "\n" ; } for ( $n = 1 ; $n <= $N ; $n ++ ) { print $nlist[$n]."\n" ; } for ( $m = 1 ; $m <= $M ; $m ++ ) { print $row[$m] ; } print STDERR "done\n" ;