文章
6
粉丝
369
获赞
1
访问
49.5k
#include<stdio.h>
typedef struct mg {
char s;
int flag;
}mg;
typedef struct dir {
int x;
int y;
}dir;
int main() {
int w, h;
int nextx, nexty;
int id;
dir d[4] = { {-1,0}, {0,1}, {1,0}, {0,-1} };
while (scanf("%d %d", &w, &h) != EOF) {
mg a[100][100];
getchar();
int startx = 0, starty = 0;
for (int i = 0; i < w; i++) {
for (int j = 0; j < h; j++) {
scanf("%c", &a[i][j].s);
a[i][j].flag = 0;
 ...
登录后发布评论
暂无评论,来抢沙发