#include #include #include char poile[76][76]; int x,y; void point(char *p) { int x,y; sscanf(p,"%d %d",&x,&y); if (poile[x][y]==' ' || poile[x][y]=='o') { poile[x][y]='o'; } else { poile[x][y]='*'; } } void text(char *p) { int x2,y2,i; char *s=index(index(p,' ')+1,' ')+1; sscanf(p,"%d %d",&x2,&y2); /* printf("--%s--", s);*/ for (i=0;ix) break; } } void clear(char *p) { int x1,y1,x2,y2,j; sscanf(p,"%d %d %d %d",&x1,&y1,&x2,&y2); if (x2 < x1) { j = x2; x2 = x1; x1 = j; } if (y2 < y1) { j = y2; y2 = y1; y1 = j; } for (;x1<=x2;x1++) for(j=y1;j<=y2;j++) poile[x1][j]=' '; } char zpras(char a, char b) { if ((b == ' ') || (a == b)) return a; if (((a == '/') && (b == '\\')) || ((a == '\\') && (b == '/')) || (b == 'x')) return 'x'; if (((a == '-') && (b == '|')) || ((a == '|') && (b == '-')) || (b == '+')) return '+'; return '*'; } void line(char *p) { int x1,y1,x2,y2,j; sscanf(p,"%d %d %d %d",&x1,&y1,&x2,&y2); if (x2 < x1) { j = x2; x2 = x1; x1 = j; j = y2; y2 = y1; y1 = j; } if (x1==x2) { if (y2 < y1) {j=y2;y2=y1;y1=j;} for (;y1<=y2;y1++) poile[x1][y1]= zpras('|', poile[x1][y1]); } else if (y1==y2) { if (x2 < x1) {j=x2;x2=x1;x1=j;} for (;x1<=x2;x1++) poile[x1][y1]= zpras('-', poile[x1][y1]); } else if (y1y2) for (;x1<=x2;x1++,y1--) poile[x1][y1]= zpras('/', poile[x1][y1]); } int main(void) { char s[1024] = "",*p; int m,n; while (1) { scanf("%d %d",&x,&y); if ( (x == 0) && (y == 0) ) break; scanf("\n"); for (m=0;m<=x;m++) for (n=0;n<=y;n++) poile[m][n]=' '; while (1) { gets(s); if ( (p=index(s,' ')) == NULL) { printf("+"); for (n=0;n