#include #include #include using namespace std; typedef long long ll; vector> v[100010]; set s; ll dp[100010],b[100010]; int main(){ ll i,j,n,m,a; cin >> n >> m >> a; for(i=0;i> l >> r >> p; l--; v[r].push_back({l,p}); if(r==n){ s.insert(l); b[l] = p; } } for(i=1;i<=n;i++){ dp[i] = -100000000000000000; } dp[0] = 0; for(i=1;i