Posts by Ray
vim, 212 bytes A:<ESC>"xddO11@aj044j116jdj31@ar2j242jdj314jd3j$51@ar4j42d3j512jdG<ESC>:%s/\(\d\d\)/@ar\1@bj/g "dDqaA 0<ESC>qqbYp$<C-A>qxkDqc@a6@bjq(7@c(@doI X C M<ES...
sed, 16 bytes /[abipq]/{c q};d Prints a newline for true and an empty string for false. Annotated /[abipq]/{ # run grouped commands for lines matching [abipq] c # change curr...
vim, 42 bytes Better approach than my previous attempt: we can do this in parallel by having our macro only increment the counter and then replace only the Lone Ones with calls to it. :s/111*//g ...
vim, 77 bytes Input is a binary string. :s/^/0 0/ yyP :s/./@a/g qa:g/010*$/s/010*$//e|0:norm<C-V><C-A> :s/111*0*$//e qGdd@"WD <C-V> is 0x16. <C-A> is 0x01 Ungolfe...
