#include #include using namespace std; int main(){ int n, m; cin >> n >> m; int dp[1<> a[i] >> b[i] >> c[i]; for(int i = 1; i < 1<