Draw fences by smkt

#define X [x*2
#define Y j*2+41
#define Z [Y-1]
main(j,x,w){char A[99][99],i=0;while(gets(A[i++]));for(j=0;j<i;j++){for(x=0;*A[x-1]|!x;x++)A[Y]X+1]=A[j][x],A[Y]X]=A[j][x-1]^A[j][x]?'|':32,A Z X]=43+(A[j][x]==A[j][x-1])*2
,A Z X+1]=45,A[j][x]==A[j-1][x]?A Z X+1]=A Z X]=32:0;}for(j=0;j<i;j++){for(w=0;w<x*2;w+=2)A[Y-2][w]/'|'|A[Y][w]/'|'?A Z[w]=43:0,A[Y-2][w]=='|'&A[Y][w]/'|'&(A Z[w-1]==32|!w&
A Z[w+1]==32)?A Z[w]= '|':0;A Z[w-1]=0;}for(j=0;j<i*2;)puts(A[j+++40]);}

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page