mirror of
https://github.com/xlucn/PAT.git
synced 2026-02-07 19:43:43 +08:00
27 lines
439 B
C
27 lines
439 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int N, M;
|
|
int fullmark[100], answer[100];
|
|
int score, choice;
|
|
|
|
scanf("%d %d", &N, &M);
|
|
for (int i = 0; i < M; i++)
|
|
scanf("%d", fullmark + i);
|
|
for (int i = 0; i < M; i++)
|
|
scanf("%d", answer + i);
|
|
|
|
for (int i = 0; i < N; i++) {
|
|
score = 0;
|
|
for (int j = 0; j < M; j++) {
|
|
scanf("%d", &choice);
|
|
if (choice == answer[j])
|
|
score += fullmark[j];
|
|
}
|
|
printf("%d\n", score);
|
|
}
|
|
|
|
return 0;
|
|
}
|