{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n TT and FF are ... friends. Uh... very very good friends -________-b\u003cbr\u003e\u003cbr\u003e\n FF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin with, TT should write down a sequence of integers-_-!!(bored).\u003cbr\u003e\n \u003ccenter\u003e\n \u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/bf7ec69d6e48dd352d4f076830255c22?v\u003d1679340734\"\u003e\n \u003c/center\u003e\u003cbr\u003e\n Then, FF can choose a continuous subsequence from it(for example the subsequence from the third to the fifth integer inclusively). After that, FF will ask TT what the sum of the subsequence he chose is. The next, TT will answer FF\u0027s question. Then, FF can redo this process. In the end, FF must work out the entire sequence of integers.\u003cbr\u003e\u003cbr\u003e\n Boring~~Boring~~a very very boring game!!! TT doesn\u0027t want to play with FF at all. To punish FF, she often tells FF the wrong answers on purpose.\u003cbr\u003e\u003cbr\u003e\n The bad boy is not a fool man. FF detects some answers are incompatible. Of course, these contradictions make it difficult to calculate the sequence.\u003cbr\u003e\u003cbr\u003e\n However, TT is a nice and lovely girl. She doesn\u0027t have the heart to be hard on FF. To save time, she guarantees that the answers are all right if there is no logical mistakes indeed.\u003cbr\u003e\u003cbr\u003e\n What\u0027s more, if FF finds an answer to be wrong, he will ignore it when judging next answers.\u003cbr\u003e\u003cbr\u003e\n But there will be so many questions that poor FF can\u0027t make sure whether the current answer is right or wrong in a moment. So he decides to write a program to help him with this matter. The program will receive a series of questions from FF together with the answers FF has received from TT. The aim of this program is to find how many answers are wrong. Only by ignoring the wrong answers can FF work out the entire sequence of integers. Poor FF has no time to do this job. And now he is asking for your help~(Why asking trouble for himself~~Bad boy)\u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Line 1: Two integers, N and M (1 \u0026lt;\u003d N \u0026lt;\u003d 200000, 1 \u0026lt;\u003d M \u0026lt;\u003d 40000). Means TT wrote N integers and FF asked her M questions.\u003cbr\u003e\u003cbr\u003e\nLine 2..M+1: Line i+1 contains three integer: Ai, Bi and Si. Means TT answered FF that the sum from Ai to Bi is Si. It\u0027s guaranteed that 0 \u0026lt; Ai \u0026lt;\u003d Bi \u0026lt;\u003d N.\u003cbr\u003e\u003cbr\u003e\nYou can assume that any sum of subsequence is fit in 32-bit integer.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"A single line with a integer denotes how many answers are wrong."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e\u003cpre\u003e10 5\r\n1 10 100\r\n7 10 28\r\n1 3 32\r\n4 6 41\r\n6 6 1\r\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e1\r\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}