{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\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\u003c/p\u003e\u003cp align\u003d\"center\"\u003e\u003cimg align\u003d\"absmiddle\" src\u003d\"CDN_BASE_URL/3b276ec6cce278e02c8588ea450bbd22?v\u003d1713879623\"\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\u003d1713879623\"\u003e. However, if you drop the third test, your cumulative average becomes \u003cimg align\u003d\"absmiddle\" src\u003d\"CDN_BASE_URL/f70df6d58de94d28226a4ac887bd9425?v\u003d1713879623\"\u003e.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\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"}},{"title":"Output","value":{"format":"HTML","content":"\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"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 1\r\n5 0 2\r\n5 1 6\r\n4 2\r\n1 2 7 9\r\n5 6 7 9\r\n0 0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e83\r\n100\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\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"}}]}