find minimum cyclic parts by 51b

char*p;main(n,s){for(;gets(s);puts(p))for(n=0,p=s+strlen(s);bcmp(s,--p,++n)||s<p-n&p[-n]-*p;);}

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

download

return to the top page