這個不斷RE...
陣列 早就>所需...
為何還是re我汗...
RE/傳送 = 10%......
#include<stdio.h>
char board[1000][1000];
int point[40000][10];
int main(){
int head,tail;
int N,i,j,x,y;
while(scanf("%d",&N)==1){
head=0;tail=0;
for(i=1;i<=N;i++)
scanf("%s",&board[i][1]);
scanf("%d %d",&x,&y);
point[head][0]=x+1;point[head][1]=y+1;
tail++;
while(head<tail){
x=point[head][0];y=point[head][1];
board[x][y]='+';
if(x>1){
if(board[x-1][y]=='-'){
point[tail][0]=x-1;point[tail][1]=y;
tail++;
}
}
if(y>1){
if(board[x][y-1]=='-'){
point[tail][0]=x;point[tail][1]=y-1;
tail++;
}
}
if(x<N){
if(board[x+1][y]=='-'){
point[tail][0]=x+1;point[tail][1]=y;
tail++;
}
}
if(y<N){
if(board[x][y+1]=='-'){
point[tail][0]=x;point[tail][1]=y+1;
tail++;
}
}
head++;
}
for(i=1;i<=N;i++){
printf("%s\n",&board[i][1]);
}
}
return 0;
}