#include "bits/stdc++.h" using namespace std; int main() { int N,M; std::cin >> N >> M; std::vector> table(N,std::vector(N,0)); std::vector dp(1<> t1 >> t2 >> sc; table[t1][t2]=sc; } for(int i=0;i<(1<