Reverse BWT by 7gyou

char t[];main(x,l,a,i,b,L){for(;~scanf("%d%s",&x,t);)for(L=l=strlen(t);a=i=~x||putchar(l--?a:10)-10;b=i)for(x=x-b++?x:-1;b-=a==t[i];a+=!i)i=++i%L;}

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

download

return to the top page