{"trustable":false,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\t\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n\t MathJax.Hub.Config({\n\t extensions: [\"tex2jax.js\"],\n\t jax: [\"input/TeX\", \"output/SVG\"],\n\t tex2jax: {\n\t inlineMath: [ [\u0027$\u0027,\u0027$\u0027], [\"\\\\(\",\"\\\\)\"] ],\n\t displayMath: [ [\u0027$$\u0027,\u0027$$\u0027], [\"\\\\[\",\"\\\\]\"] ],\n\t processEscapes: true\n\t },\n\t });\n\t\u003c/script\u003e\n\t\u003cscript type\u003d\"text/javascript\"\n\t src\u003d\"https://cdn.staticfile.org/mathjax/2.7.0/MathJax.js\"\u003e\n\t\u003c/script\u003e\n \n \u003cp\u003e 当jxy专注于解决问题时,jxy通常更喜欢呆在电脑前而不是出去吃午饭。这时,jxy可以要求送餐。\n\n\n\n假设有n个人生活在一条直街上,这条直街正好位于x坐标轴上。人的坐标是十一米。街上有一家外卖餐馆,坐标是x米。一天的午餐时间,每个人都在同一时间从餐厅点菜。作为餐厅的一名员工,你需要从餐厅开始,把食物送到N个人那里,然后再回到餐厅。你的速度是每分钟v-1米。\n\n\n\n你知道,N人有不同的个性,因此他们对食物到达的时间有不同的感觉。他们的感情是用不愉快指数来衡量的。开始时,每个人的不愉快指数为0。在等待食物时,第i个人每分钟会获得双不快指数。\n\n\n\n如果一个人的不满指数过高,他就不会再购买你的食物了。所以你需要尽可能地降低所有人的不满指数之和,以使你的收入最大化。你的任务是找到最小量的不满指数。 \u003c/p\u003e \n \n \u003c/em\u003e. \u003c/p\u003e \n \u003cp\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003e The input contains multiple test cases, separated with a blank line. Each case is started with three integers \u003ci\u003eN\u003c/i\u003e ( 1 \u0026lt;\u003d \u003ci\u003eN\u003c/i\u003e \u0026lt;\u003d 1000 ), \u003ci\u003eV\u003c/i\u003e ( \u003ci\u003eV\u003c/i\u003e \u0026gt; 0), \u003ci\u003eX\u003c/i\u003e ( \u003ci\u003eX\u003c/i\u003e \u0026gt;\u003d 0 ), then \u003ci\u003eN\u003c/i\u003e lines followed. Each line contains two integers \u003ci\u003eX\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ( \u003ci\u003eX\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e \u0026gt;\u003d 0 ), \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ( \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e \u0026gt;\u003d 0), which are described above. \u003c/p\u003e \n \u003cp\u003e You can safely assume that all numbers in the input and output will be less than 2\u003csup\u003e31\u003c/sup\u003e - 1. \u003c/p\u003e \n \u003cp\u003e Please process to the end-of-file. \u003c/p\u003e \n \u003cp\u003e\u003cb"}},{"title":"Output","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003e For each test case please output a single number, which is the minimal sum of \u003cem\u003e\u003cstrong\u003eDispleasure Index\u003c/strong\u003e\u003c/em\u003e. One test case per line. \u003c/p\u003e \n \u003cp\u003e\u003cb"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003e 5 1 0\u003cbr\u003e 1 1\u003cbr\u003e 2 2\u003cbr\u003e 3 3\u003cbr\u003e 4 4\u003cbr\u003e 5 5\u003cbr\u003e \u003cbr\u003e \u003c/p\u003e \n \u003cp\u003e\u003cb"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003e 55\u003cbr\u003e \u003cbr\u003e \u003c/p\u003e \n "}}]}