#include #include #include using namespace std; int max_score=-1; void proc(int i, int n, vector& buf, unordered_set& selected, vector>& map){ if(i>=n){ int score=0; for(int j=0; j> n >> m; vector> map(n, vector(n, 0)); for(int i=0; i> i1 >> i2 >> s; map[i1][i2]=s; } vector buf(n); unordered_set selected; proc(0, n, buf, selected, map); cout << max_score << endl; return 0; }