-->
当前位置:首页 > 题库

PROGRAMMING:Judgment questions

Luz5年前 (2021-05-10)题库411
Judgment is very simple, this problem requires you to write a simple program to help the teacher judge the problem and count the score of students' judgment.
###Input format:
Input two positive integers n and m with no more than 100 in the first line, which are the number of students and the number of judgment questions respectively. The second line gives m positive integers no more than 5, which is the full score of each question. The third line gives the correct answer to each question, with 0 for "no" and 1 for "yes". Then n lines, each line gives a student's answer. The numbers are separated by spaces.
###Output format:
Output the scores of each student in the order of input, and each score occupies one line.
###Input example:
```in
3 6
2 1 3 3 4 5
0 0 1 0 1 1
0 1 1 0 0 1
1 0 1 0 1 0
1 1 0 0 1 1
```
###Output example:
```out
thirteen
eleven
twelve
```







answer:If there is no answer, please comment