#include <iostream>
#include <numeric>
#include <vector>
using std::vector;
using std::cout;
using std::endl;
int main()
{
vector<int> v1{ 0, 1, 2, 3, 4 } , v2{ 5, 1, 2, 6, 4 };
int n = inner_product(v1.begin(), v1.end(), v2.begin(), 0, std::plus<>(), std::equal_to<>());
cout << n << endl;
return 0;
}
/*
run:
3
*/