{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"给定一个长为N的数组a[],有M个询问和结果。所谓询问形如:x y z,表示a[x]+a[x+1]+……+a[y]\u003dz。如果某个询问及结果与前面的询问及结果冲突,即为错误结果。输出总共有多少错误结果。\ntip:假设已知{1 10 100},之后出现{1 9 200} ,则显然{1 9 200}是错误的(我们假定先出现的必定正确)。"}},{"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. \n\u003cbr\u003e \n\u003cbr\u003eLine 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. \n\u003cbr\u003e \n\u003cbr\u003eYou can assume that any sum of subsequence is fit in 32-bit integer. \n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"A single line with a integer denotes how many answers are wrong."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e10 5\n1 10 100\n7 10 28\n1 3 32\n4 6 41\n6 6 1\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e1\u003c/pre\u003e"}}]}