摘要:
很多图论的算法都有一个函数 我纠结了好久这个函数的意思…… 实际上是用邻接表存一个图。 cnt_edge是给每一个边标号,从0开始。 edge[i].to 表示第i条边指向哪个点,edge[i].next表示第i条边的下一条边的序号。 head[from]表示以第from为初始结点的边的序号。 例如 阅读全文
摘要:
花了两个多小时,用最蠢的方法写的……最简陋版……还不确定这么写逻辑对不对……#include #include #include #include #include using namespace std;int map[5][5];int score;int move(int& a, int& b... 阅读全文