摘要:
Ubiquitous Religions Time Limit: 1000MS Memory limit: 65536K 题目描述There are so many different religions in the world today that it is difficult to keep... 阅读全文
摘要:
今天学习了图,敲了一下邻接链表,发现用邻接链表比较方便,这里呢就写一下。建立邻接链表,并输出与每个顶点相连的点的序号。此处为无向图。#include#includeint map[100][100];//建立二维数组int main(){ int T, n, m, u, v, i, j;//... 阅读全文
摘要:
邻接矩阵:#include#includeint map[100][100];int main(){ int n, m, i, j, u, v, w, k; while(~scanf("%d %d", &n, &m)) { memset(map, 0, sizeof(map)); for(i=1; ... 阅读全文