{"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":"HTML","content":"初始时有一个1~n的序列,需要执行m次操作,每次操作给出一个k,需要将当前序列中第k小的数字删掉,问删除掉的元素总和是多少?"}},{"title":"Input","value":{"format":"HTML","content":"第一个数T,表示测试数据的组数。\u003c/br\u003e\n每组测试数据,第一行2个整数n和m,m表示操作的轮数。\u003c/br\u003e\n约束:\u003cbr\u003e\n1. 1 \u003c\u003d T \u003c\u003d 128\u003cbr\u003e\n2. 1 \u003c\u003d K \u003c\u003d N \u003c\u003d 262 144\u003cbr\u003e\n3. 1 \u003c\u003d Ki \u003c\u003d N - i + 1\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"每组数据,首先输出\"Case x: \"表示第x组样例(不含引号)\u003cbr\u003e\n然后输出一个整数,表示删除元素的总和。"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n3 2\n1 1\n10 3\n3 9 1\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eCase 1: 3\nCase 2: 14\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"样例一:初始序列为{1,2,3},第一次操作需要删掉最小的数字:1,序列变成了{2,3};第二次操作需要删掉最小的数字:2,序列变成了{3}。所以答案为1+2\u003d3\u003cbr\u003e\n样例二:初始序列为{1,2,3,4,5,6,7,8,9,10},删掉第三小的数字:3,序列变成了{1,2,4,5,6,7,8,9,10};然后删掉第九小的数字:10,序列变成了{1,2,4,5,6,7,8,9};最后删掉最小的数字:1,序列变成了{2,4,5,6,7,8,9}。所以答案为3+10+1\u003d14"}}]}