#include <vector>
#include <iterator>
#include <algorithm>
#include <iostream>

using namespace std;

const int spaceSize = 10;

void Negate(vector<double>& x, vector<double>& y)
{
    // transform(x.begin(), x.end(), back_inserter(y), negate<double>());
    transform(x.begin(), x.end(), y.begin(), negate<double>());
}


int main()
{
    vector<double> one, two;
    for(int i = 0; i < spaceSize; i++)
    {
        one.push_back(2.0 * i);
        two.push_back(1.0 * i);
    }

    Negate(one, two);

    copy(two.begin(), two.end(), ostream_iterator<int>(cout, "\n"));
    return 0;
}
