#include <iostream>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
int total[105], right[105];
for (int i = 0; i < m; i++)
{
cin >> total[i];
}
for (int i = 0; i < m; i++)
{
cin >> right[i];
}
int t;
int score[105] = { 0 };
for (int j = 0; j < n; j++)
{
for (int i = 0; i < m; i++)
{
cin >> t;
if (t == right[i])
{
score[j] += total[i];
}
}
}
for (int i = 0; i < n; i++)
{
cout << score[i] << endl;
}
return 0;
}
1061 判断题
最新推荐文章于 2022-11-13 11:39:55 发布