#C7905. Survey Statistics
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:
- The percentage of users who answered 'Yes' (represented by 1) to at least \( \frac{X}{100} \times N \) questions.
- 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:
- The first line contains an integer ( U ), the number of users.
- The second line contains an integer ( N ), the number of questions each user answered.
- The next ( U ) lines each contain ( N ) space-separated integers (each either 0 or 1) representing a user's responses.
- 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:
- The percentage of users whose 'Yes' responses are at least ( \frac{X}{100} \times N ).
- 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