Ice Growth

아직 제출이 없습니다시간 제한1.5초메모리 제한1024 MB

문제

Ice growth is dependent on temperature. A rule of thumb is that every 55 degrees of frost (on average in a 2424-hour period) contributes to 11 cm of ice growth, whilst every 55 degrees above zero removes 11 cm of ice. For example, if there are three days with average temperatures of 3-3, 11 and 7-7 degrees Celsius there will be a total of 31+7=93 - 1 + 7 = 9 degrees of frost and thus 1.81.8 cm of ice growth at the end of day 33. Of course, the ice thickness cannot be negative. If there is enough ice, people can skate on it. The required ice thickness depends on the person, as different persons have different perceptions of safety.

There is currently no ice, but the weather report for the next nn days has just come in, and a group of kk people wants you to figure out how many of these days they can skate on the ice at the end of the day.

입력

The input consists of:

  • One line containing two integers, nn (1n1051\leq n \leq 10^5) the number of days and kk (1k1051 \leq k \leq 10^5) the number of people.
  • One line with nn integers a_1,,a_na\_1, \ldots, a\_n (106a_i106-10^6 \leq a\_i \leq 10^6 for all ii), the average temperature on day ii.
  • One line with kk integers b_1,,b_kb\_1, \ldots, b\_k (1b_j1061 \leq b\_j \leq 10^6 for all jj), the required minimal ice thickness in cm before person jj can skate on the ice.

출력

Output a line with kk integers c_1,,c_kc\_1, \ldots, c\_k, where c_jc\_j is the number of days that person jj can skate on the ice at the end of the day.