#include using namespace std; using ll = long long; int main(){ int n,m; cin>>n>>m; vector >a(n,vector(n,0)); for(int i = 0;i>u>>v>>c; a[u][v] = c; } vector dp(1<>j&1){ int now = 0; for(int k = 0;k>k&1) now += a[k][j]; dp[i|1<