#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b>n>>m; ll g[n][n]; rep(i,n)rep(j,n) g[i][j]=-1; rep(i,m){ int u,v;ll c;cin>>u>>v>>c;u--,v--; chmax(g[u][v],c); chmax(g[v][u],c); } ll dp[1<>u)&1){ for(int v=0;v>v)&1)==0){ if(g[u][v]>=0) chmax(dp[bit+(1<