#include <iostream>
#include <vector>

template <typename T>
int operator+(std::vector<T> v1, std::vector<T> v2) {
	if(v1.size() != v2.size()) { throw; } //for simplicity
	int sum = 0;
	for(size_t x = 0; x < v1.size(); x++) {
		sum += v1.at(x) + v2.at(x);
	}
	return sum;
}

int main() {
	std::vector<int> v1(3, 5), v2(3, 1);
	std::cout << v1 + v2 << std::endl; //should be 5*3 + 3*1 = 18
	
	std::vector<std::vector<int>> v3(2, std::vector<int>(3, 5)), v4(2, std::vector<int>(3, 1));
	std::cout << v3 + v4 << std::endl; //should be 5*3*2 + 3*1*2 = 36
	
	return 0;
}