{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\u003cp\u003eIn a certain course, you take \u003ci\u003en\u003c/i\u003e tests. If you get \u003ci\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e out of \u003ci\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e questions correct on test \u003ci\u003ei\u003c/i\u003e, your cumulative average is defined to be\n今年有 n 场 ACM-ICPC 竞赛,小明每场都有资格参加。第 i 场竞赛共有 b[i] 道题。小明预测第 i 场他能做出 a[i] 道题。为了让自己看着更“大佬”一些,小明想让自己平均做出的题数越大越好,也就是最大化大佬度,大佬度的定义如下:\u003c/p\u003e\u003cp align\u003d\"center\"\u003e\u003cimg align\u003d\"absmiddle\" src\u003d\"CDN_BASE_URL/3b276ec6cce278e02c8588ea450bbd22?v\u003d1608876636\"\u003e.\u003c/p\u003e\u003cp\u003eGiven your test scores and a positive integer \u003ci\u003ek\u003c/i\u003e, determine how high you can make your cumulative average if you are allowed to drop any \u003ci\u003ek\u003c/i\u003e of your test scores.\u003c/p\u003e\u003cp\u003eSuppose you take 3 tests with scores of 5/5, 0/1, and 2/6. Without dropping any tests, your cumulative average is \u003cimg align\u003d\"absmiddle\" src\u003d\"CDN_BASE_URL/1d5abb1f890636d0a47bac88f3b1436b?v\u003d1608876636\"\u003e. However, if you drop the third test, your cumulative average becomes \u003cimg align\u003d\"absmiddle\" src\u003d\"CDN_BASE_URL/f70df6d58de94d28226a4ac887bd9425?v\u003d1608876636\"\u003e.\u003c/p\u003e\u003c/div\u003e\n为了达到这个目的,小明决定放弃 k 场比赛的参赛资格。请求出最大的大佬度。\n\n例如有 3 场小型比赛,题数分别是 5 题、1 题、6 题,小明预测自己分别能做出 5 题、0题、2题。如果每场都参加,那么大佬度是 ,看着不怎么大佬。不过,如果放弃第 3 场比赛,那么大佬度就是 ,看着更加大佬了。"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe input test file will contain multiple test cases, each containing exactly three lines. The first line contains two integers, 1 ≤ \u003ci\u003e n\u003c/i\u003e ≤ 1000 and 0 ≤ \u003ci\u003e k\u003c/i\u003e \u0026lt; \u003ci\u003en\u003c/i\u003e. The second line contains \u003ci\u003e n\u003c/i\u003e integers indicating \u003ci\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e for all \u003ci\u003ei\u003c/i\u003e. The third line contains \u003ci\u003e n\u003c/i\u003e positive integers indicating \u003ci\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e for all \u003ci\u003ei\u003c/i\u003e. It is guaranteed that 0 ≤ \u003ci\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ \u003ci\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 1, 000, 000, 000. The end-of-file is marked by a test case with \u003ci\u003en\u003c/i\u003e \u003d \u003ci\u003ek\u003c/i\u003e \u003d 0 and should not be processed.\u003c/p\u003e\u003c/span\u003e\u003c/div\u003e\n\n\n\n\n\n\n\nInput\n输入测试文件含有多组测试,每组有 3 行。第一行有 2 个整数, 1 ≤ n ≤ 1000 和 0 ≤ k \u003c n。第二行有 n 个整数,即每个 a[i]。第三行含有 n 个正整数 b[i]。保证 0 ≤ a[i] ≤ b[i] ≤ 1, 000, 000, 000。文件末尾由 n \u003d k \u003d 0 标识,并且不应该被处理。\n\nOutput\n对于每组测试数据,输出一行整数,即放弃 k 场比赛后可能的最高大佬度。大佬度应该舍入到最近的整数。"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\u003cp\u003eFor each test case, write a single line with the highest cumulative average possible after dropping \u003ci\u003ek\u003c/i\u003e of the given test scores. The average should be rounded to the nearest integer.\u003c/p\u003e\u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e3 1\n5 0 2\n5 1 6\n4 2\n1 2 7 9\n5 6 7 9\n0 0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e83\n100\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\u003cp\u003eTo avoid ambiguities due to rounding errors, the judge tests have been constructed so that all answers are at least 0.001 away from a decision boundary (i.e., you can assume that the average is never 83.4997).\u003c/p\u003e\u003c/div\u003e"}}]}