#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<int> a = { 1, 2, 3, 4, 5};
vector<int> b;
transform(a.begin(), a.end()-1, a.begin()+1, back_inserter(b), plus<int>());
for (auto elem : b)
cout << elem << " ";
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7Cgl2ZWN0b3I8aW50PiBhID0geyAxLCAyLCAzLCA0LCA1fTsKCXZlY3RvcjxpbnQ+IGI7CgkKCXRyYW5zZm9ybShhLmJlZ2luKCksIGEuZW5kKCktMSwgYS5iZWdpbigpKzEsIGJhY2tfaW5zZXJ0ZXIoYiksIHBsdXM8aW50PigpKTsKCQoJZm9yIChhdXRvIGVsZW0gOiBiKQoJCWNvdXQgPDwgZWxlbSA8PCAiICI7CgkKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCXJldHVybiAwOwp9