|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||0||0||0||0.000%|
One of the ideas of the current health care system is that the competition between private companies (as opposed to a government-run health care system) will give patients the option to choose from among many competitors the company and plan that best suits their needs. De facto, though, the market is not nearly as competitive as one would like, and often carved up geographically, with near-monopolies in many areas. In addition, there is a second problem: it is hard to know a priori which plan will be best for a person’s needs, since it is hard to predict just what benefits one will need. Statistically, over large populations, predictions tend to be pretty accurate, but for just one person (e.g., you), it may be hard to say whether you will have a terrible accident in the next 10 years. If you could predict the future, choosing the right plan would be a lot easier. Although even then, figuring out from a prospectus exactly what is or is not covered isn’t trivial. So you’ll write a program to help with that.
You will be given texts describing different health plans, in terms of their premiums and co-payments. You will also be given your projected visits for the next year, and are supposed to figure out which of the plans will be best for you. For the following, a sentence always ends with a ‘.’. You can ignore all other punctuations (spaces, line breaks, commas, semicolons). The text will mix lower-case and upper-case; your program should be case-insensitive, i.e., treat them the same. Texts will contain only letters (upper and lower case), numbers, spaces and line breaks, the punctuations marks ‘.’, ‘,’, ‘;’, and the characters ‘%’ and ‘\$’. All numbers will be integers. The texts will be talking about:
After being given the description of the plans, you will be given a list of visits to the doctor. Each has just one number, namely, the cost of that visit. Your goal is then to list the total expense for each plan.
The first line contains the number K of data sets. This is followed by K data sets, each of the following form:
The first line contains two integers m,n between 1 and 1000. This is followed by m lines of text describing the health plans. Each line has at most 80 characters. There will always be at least one plan. There can be multiple sentences on a line, and sentences can span multiple lines. Next come n lines, each giving one integer, the cost of that visit to the doctor’s.
For each data set, first output “Data Set x:” on a line by itself, where x is its number. Then, output, one per line, the total amount of money you have to spend (for premium and copay) for each of the plans, rounded to two decimals. These should be ordered in the order that the plans are first mentioned in the text. Each data set should be followed by a blank line.
1 9 5 In this article, we will compare a number of different health insurance options. We will look at 3 different plans. Plan UnNeeded is intended for healthy individuals; it has a low premium of 500 dollars. Plan MiddleOfTheRoad offers a balanced option. Its premium is $2000. The copayment per visit is 10% or 200$, whichever is lower. Plan Sicko is intended for heavy usage. Its premium is $3000. The copayment is at most 10$ PER VISIT or 3 percent. Oh, we also forgot to mention; Plan unneeded has a total copay of 10%. 500 110 1750 2000 12000
Data Set 1: 2136.00 2636.00 3043.30