Skip to main content
deleted 1 character in body
Source Link

AWK, 120 119118 bytes

{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printfprint RSFS}}

Try it online!Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 119 bytes

{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf RS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 118 bytes

{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}print FS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

deleted 12 characters in body
Source Link

AWK, 120 119 bytes

BEGIN{FS=""}{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf RS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 119 bytes

BEGIN{FS=""}{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf RS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 119 bytes

{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf RS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

added 22 characters in body
Source Link

AWK, 120120 119 bytes

BEGIN{FS=""}{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf"\n"printf RS}}

Try it online!Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 bytes

{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf"\n"}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

AWK, 120 119 bytes

BEGIN{FS=""}{while(i++<NF)r[i]=int(rand()*NF)+1;for(;l++<NF;j=k=0){while(k++<NF)if(r[k]==l){printf"%*c",k-j,$k;j=k}printf RS}}

Try it online!

I've included the 5 bytes in the score for the necessary -F '' switch, but I had to use the BEGIN{FS=""} directive for the TIO link since it doesn't process the command-line switch properly.

Source Link
Loading