一、问题描述
二、解答
#include<iostream>
using namespace std;
int main()
{int n;cin >> n;int w[100001] = { 0 };int score[100001] = { 0 };for (int i = 1; i <= n; i++){cin >> w[i] >> score[i];}int y = 0;for (int i = 1; i <= n; i++){y = y + w[i] * score[i];}if (y<=0){cout << 0 << endl;}else{cout << y << endl;}return 0;
}
三、总结
刚开始看到题目被没见过的ReLU吓到了,以为会很难,认真读懂题目后,感觉应该是我这些天做过的算最简单的了。所以说:不要被没见过的新鲜事物吓到,要迎难而上!