#include<stdio.h>
int main()
{
int N,M;
int score[100]={0},answer[100]={0},stu_score=0;
scanf("%d%d",&N,&M);
int i=0;
for(i=0; i<M; i++)
scanf("%d",&score[i]);
for(i=0; i<M; i++)
scanf("%d",&answer[i]);
for(i=0; i<N; i++)
{
stu_score = 0;
for(int j=0; j<M; j++)
{
int temp=0;
scanf("%d",&temp);
if(temp==answer[j])
stu_score += score[j];
}
printf("%d\n",stu_score);
}
return 0;
}
1061. 判断题(15)
最新推荐文章于 2021-09-15 10:02:57 发布