#C7905. Survey Statistics

    ID: 51828 Type: Default 1000ms 256MiB

Survey Statistics

Survey Statistics

In this problem, you are given the responses of U users to a survey consisting of N binary (0 or 1) questions. Your task is to determine:

  1. The percentage of users who answered 'Yes' (represented by 1) to at least \( \frac{X}{100} \times N \) questions.
  2. The percentage of users who answered 'No' (represented by 0) to all questions.

Here, \( U \) is the total number of users, \( N \) is the number of questions, and \( X \) (an integer) represents the percentage threshold. The percentage for each category is computed as \( \frac{\text{count}}{U} \times 100 \), rounded to one decimal place.

Note: The input is read from standard input (stdin) and the output should be written to standard output (stdout).

inputFormat

The input is provided via standard input as follows:

  1. The first line contains an integer ( U ), the number of users.
  2. The second line contains an integer ( N ), the number of questions each user answered.
  3. The next ( U ) lines each contain ( N ) space-separated integers (each either 0 or 1) representing a user's responses.
  4. The last line contains an integer ( X ), the percentage threshold.

outputFormat

Output two floating-point numbers (rounded to one decimal place) separated by a space:

  1. The percentage of users whose 'Yes' responses are at least ( \frac{X}{100} \times N ).
  2. The percentage of users who answered 'No' to every question.## sample
5
4
1 0 1 1
1 1 1 1
0 0 0 0
0 1 0 1
1 1 0 0
60
40.0 20.0