定义vector数组来存储 使用结构体+中间变量,或结构体的构造函数来实现 代码: #include <vector> #include <stdio.h> using namespace std; const int N = 10; struct Node{ int v; int w; }; //构造函数存储图的信息 struct newNode{ int v,w; newNode(int _v,int _w) : v(_v), w(_w) {...
# 复习思路 # 基本用法 cctype:tolower toupper (ctype.h) stoi to_string substr(start,len) algorithm sort(a,a+n,cmp) %d %lld %s %c % getchar() cin.getline() sscanf() sprintf() fill(e[0],e[0]+MAXN*MAXN,inf); fill(dis,dis+MAXN,inf); vector map set foreach 。。。 # 基本...