#include using namespace std; #define rep(i,a,b)for(int i=a;ib;i--) #define R(a) rep(i,0,a) #define RR(a,b) rep(i,0,a)rep(j,0,b) #define RRR(a,b,c) RR(a,b)rep(k,0,c) #define el '\n' #define YN(p) cout << (p?"Yes":"No") << el; #define SU(p) cout << p << el; #define PU(p) cout << p.first << ' ' << p.second << el; #define VU(p) R(p.size())cout << p[i] << (i!=p.size()-1?' ':el); #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define Toup(s) transform(all(s),s.begin(),[](char c){return toupper(c);}) #define Tolow(s) transform(all(s),s.begin(),[](char c){return tolower(c);}) #define fix() cout << fixed << setprecision(12); using ll = long long; const int inf = 1073041824; const ll INFL=1LL<<60; const ll mod= 998244353; const ll MOD=1000000007; bool ok=false; const int fj[4]={0,1,0,-1};//上右下左 const int fi[4]={-1,0,1,0}; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin >> n >> m; vector>dis(n,vector(n,-inf)); int u,v,d; R(m){ cin >> u >> v >> d; dis[u-1][v-1]=max(dis[u-1][v-1],d); dis[v-1][u-1]=max(dis[v-1][u-1],d); } vector>dp((1<(n,0)); R(1<