#!perl -ln0 S//\S+/g,/(? |
#!perl -ln0 s// /;S//(\S+)/g,/(? |
never gonna catch me, Wladimir! :)
#!perl -ln0 s// /;0//(\S+)/g,/(? |
#!perl -ln0 s// /;0//(\S+)/g,/(? |
#!perl -ln0 s// /;/(\S+)/g,($a=$1)?/(? |
Sorry for sending almost the same thing, just hard to debug the code as it passes the test program and all the tests I can think of :)
#!perl -ln0 s// /;/(\S+)/g,($a=$1)?/(? |
#!perl -ln0 s// /;/(\S+)/g,($a=$1)=~//?/(? |
#!perl -ln0
s/^(\S+) \1$/$1/gm;/(\S+)/g,($a=$1)?/ \Q$a\E
/?0:do{while(s/^\Q$a\E\s//m){};print$a;//?3:exit}:3/$/while 3
|
#!perl -ln0 s// /;/(\S+)/g,($a=$1)=~//?/(? |
Curse the special cases :)
#!perl -ln0
s/^/
/while s/^(\S+) \1$/$1/m;/(\S+)/g,($a=$1)?/\Q $a\E$/m?0:do{while(s/^\Q$a\E\s//m){};print$a;//?3:exit}:3/$/while 1
|