{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n h1 { font-size: 1.2em; }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cdiv class\u003d\"md\"\u003e\u003cp\u003eThere are \u003cspan class\u003d\"math inline\"\u003e$ n $\u003c/span\u003e projects you can attend. For each project, you know its starting and ending days and the amount of money you would get as reward. You can only attend one project during a day.\u003c/p\u003e\n\u003cp\u003eWhat is the maximum amount of money you can earn?\u003c/p\u003e\n\u003ch1 id\u003d\"input\"\u003eInput\u003c/h1\u003e\n\u003cp\u003eThe first input line contains an integer \u003cspan class\u003d\"math inline\"\u003e$ n $\u003c/span\u003e: the number of projects.\u003c/p\u003e\n\u003cp\u003eAfter this, there are \u003cspan class\u003d\"math inline\"\u003e$ n $\u003c/span\u003e lines. Each such line has three integers \u003cspan class\u003d\"math inline\"\u003e$ a_i $\u003c/span\u003e, \u003cspan class\u003d\"math inline\"\u003e$ b_i $\u003c/span\u003e, and \u003cspan class\u003d\"math inline\"\u003e$ p_i $\u003c/span\u003e: the starting day, the ending day, and the reward.\u003c/p\u003e\n\u003ch1 id\u003d\"output\"\u003eOutput\u003c/h1\u003e\n\u003cp\u003ePrint one integer: the maximum amount of money you can earn.\u003c/p\u003e\n\u003ch1 id\u003d\"constraints\"\u003eConstraints\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan class\u003d\"math inline\"\u003e$ 1 \\le n \\le 2 \\cdot 10^5 $\u003c/span\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan class\u003d\"math inline\"\u003e$ 1 \\le a_i \\le b_i \\le 10^9 $\u003c/span\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan class\u003d\"math inline\"\u003e$ 1 \\le p_i \\le 10^9 $\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id\u003d\"example\"\u003eExample\u003c/h1\u003e\n\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n2 4 4\n3 6 6\n6 8 2\n5 7 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e7\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e "}}]}