摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 int n,h[1010]; 6 7 struct M 8 { 9 int data;10 struct M *next;11 }*head[1010];12 13 struct Q14 {15 int step;16 int site;17 };18 19 void init()20 {21 int i;22 for(i = 1;i <= n; i++)23 {24 head[i] =... 阅读全文
posted @ 2013-02-26 21:10 好小孩 阅读(148) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<string.h>intmark,k,m,map[101][101],vis[101][101],h[105];voidseek(intmb){if(h[mb])return;elseh[mb]=1;inti,j;if(mark){printf("%d",mb);mark=0;}elseprintf("%d",mb);for(i=1;i<k;i++){if((map[i][mb]&&!vis[i][mb])||(map[mb][i]&&!vi 阅读全文
posted @ 2013-02-26 19:42 好小孩 阅读(177) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<string.h>int mark,k,m,map[101][101],vis[101][101],h[105];void seek(int mb){ int q[100],i,s,e; s = e =0; q[e++] = mb; while(s < e) { mb = q[s++]; if(mark) { mark = 0; printf("%d",mb); } else printf(" %d"... 阅读全文
posted @ 2013-02-26 19:41 好小孩 阅读(326) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>int k,h[110],mark;struct M{ int data; struct M *next;}*head[110];void init(){ int i; for(i = 0; i < k; i++) { head[i] = (struct M *)malloc(sizeof(struct M)); head[i]->next = NULL; head[i]->data = -1; }}void l... 阅读全文
posted @ 2013-02-26 19:40 好小孩 阅读(247) 评论(0) 推荐(0)