#include <iostream>
#include <vector>
#include <numeric>

struct T
{
    double a;
    double b;
};

int main() {
	std::vector<T> v = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}};
	std::cout << std::accumulate(v.begin(), v.end(), 0.0,
					[](double acc, const T &t){ return acc + t.a; }
				) / v.size() << std::endl;
	std::cout << std::accumulate(v.begin(), v.end(), 0.0,
					[](double acc, const T &t){ return acc + t.b; }
				) / v.size() << std::endl;
	return 0;
}