dfs+打表 #include <iostream> #include <bits/stdc++.h> #include <vector> using namespace std; int MOD_NUM = 100007; int dfs(vector<vector<int>>& A, vector<int>& ans, vector<bool>& vis, int node, int des){ if(vis[node]) return ans[node]; if...