replace last occurrence FIXED by inaniwa

d;main(b,a,c){for(;~scanf("%s%s%s",a,&b,c);c<d?printf("%.*s%s%s\n",d-c,c,&b,d+strlen(a)):puts(c))for(d=index(c,0);!strstr(--d,a););}

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

download

return to the top page