wave line by 51b

n,k;main(m,s){char*q,*p;for(gets(s);m+9;k++&&m--+puts(""))for(q=p=s-1,n=0;*++p;k?m==n?q+=printf("%*c",p-q,*p):0:n>m&&m++)n+=p[-1]>*p?-1:p[-1]<*p;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page