#include using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) #define rep1(i,n) for(int i=1; i<=(n); i++) #define sz(x) int(x.size()) #define all(x) (x).begin(),(x).end() #define Q2 1000000007 #define Q 998244353 #define lINF LONG_LONG_MAX //ll #define iINF INT_MAX //int #define yes "Yes" #define no "No" #define kotae cout<; using pqg=priority_queue,greater>; using vi=vector; using vi2=vector>; using vi3=vector>>; using vl=vector; using vl2=vector>; using vl3=vector>>; using vs=vector; using vp=vector

; using vp2=vector>; void chmax(int &x, int y){ x=max(x,y); return; } void chmin(int &x, int y){ x=min(x,y); return; } void chmaxl(ll &x, ll y){ x=max(x,y); return; } void chminl(ll &x, ll y){ x=min(x,y); return; } int main() { int n,m; cin >> n >> m; vi2 a(n,vector(n)); rep(i,m){ int u,v,c; cin >> u >> v >> c; a[u][v]=c; } int s=1<>u)&1) continue; int now=0; rep(v,n){ if(u==v) continue; if((i>>v)&1) continue; now+=a[u][v]; } chmax(dp[i|(1<