#pragma region include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #pragma endregion //#include ///////// #define REP(i, x, n) for(int i = x; i < n; ++i) #define rep(i,n) REP(i,0,n) #define ALL(X) X.begin(), X.end() ///////// #pragma region typedef typedef long long LL; typedef long double LD; typedef unsigned long long ULL; typedef std::pair PLL;// typedef std::pair PII;// #pragma endregion //typedef ////定数 const int INF = (int)1e9; const LL MOD = (LL)1e9+7; const LL LINF = (LL)1e18+20; const double PI = acos(-1.0); const double EPS = 1e-9; ///////// using namespace::std; template inline void MAX(T& L,const T R){ if( L < R ) L = R; } void solve(){ int N,M; cin >> N >> M; vector< vector > fld(N,vector(N,0)); for(int i=0;i> a >> b >> c; fld[a][b] = c; } vector dp(1<