摘要: #include #include #include #define N 105#define INF 1000000000using namespace std;structnode{ int x,y;};node dir[4]={{-1,0},{1,0},{0,1},{0,-1}} ;int p[N][N],maps[N][N],visit[N][N],value[N][N],n,m,num;void bfs(int x,int y) { queueQ; node t,u,v; int xi,yi,i; t.x=x; t.y=y; me... 阅读全文
posted @ 2014-01-13 21:55 单调的幸福 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include #include int map[28][28],num,n;char output[28];int Floyd(){ int i,k,j; for(i=1;i1) return 0; for(k=1;k<=n;k++) if(map[ind][k]) degree[k]--; } output[num]='\0'; return 2;}int main(){ int m,flag,i,pos; char str[4]; while( scanf("%d%d",&n,&m)!=EOF && ( n || 阅读全文
posted @ 2014-01-13 13:18 单调的幸福 阅读(204) 评论(0) 推荐(0) 编辑