{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"题目描述","value":{"format":"MD","content":"给定 $N$, $Q$,代表序列有 $N$ 个元素,他们的初始值都是 $1$。\n接下来 $Q$ 行,每行有三个数字 $X, Y, Z$,代表将序列中 $X$ 到 $Y$ 的元素值改成 $Z$。\n最后输出序列元素的和。"}},{"title":"输入格式","value":{"format":"MD","content":"多组测试,第一个数字 $T$ 代表有几组测试。\n对于每一组测试,第一行会输入一个数字 $N (1\\le N\\le100,000)$,下一行会输入一个数字 $Q (0\\le Q\\le100,000)$。\n接下来 $Q$ 行,每行有三个数字 $X, Y, Z (1\\le X\\le Y\\le N, 1\\le Z\\le3)$\n"}},{"title":"输出格式","value":{"format":"MD","content":"对于每一次测试,输出一个数字代表序列每个元素的总和,格式: \n`Case [i]: The total value of the hook is [ans].`"}},{"title":"样例数据","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e样例输入1\u003c/th\u003e\n \u003cth\u003e样例输出1\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e1\n10\n2\n1 5 2\n5 9 3\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003eCase 1: The total value of the hook is 24.\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}