Split the day of the week, the qualified edge, and finally count whether the traffic of the settlement point is full. Pay attention to the node number.
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Define eps 1e-12 # define INF 0x7fffffff # define maxn 1000 using namespace std; int n, m; int en; int st, ed; // Source Vertex and sink vertex int dis [maxn]; // dis [I], indicating the number of layers to the origin s int que [999999]; int can [55] [11]; struct edge {int to, c, next ;}; edge e [999999]; int head [maxn]; void add (int a, int B, int c) {e [en]. to = B; e [en]. c = c; e [en]. next = head [a]; head [a] = en ++; e [en]. to = a; e [en]. c = 0; e [en]. next = head [B]; head [B] = en ++;} int bfs () {memset (dis,-1, sizeof (dis )); dis [st] = 0; int front = 0, rear = 0; que [rear ++] = st; while (front