#include<iostream>#include<vector>#include<map>#include<string>#include<cstring>#include<cstdio>#include<algorithm>#include<set>#include<queue>#include<unordered_map>#include<cmath>usingnamespace std;template<classT,classPred>voidMap(T s, T e, T x, Pred op){for(; s != e;++s,++x)*x =op(*s);}intcube(int x){return x * x * x;};doublesquare(int x){return x * x;};intmain(){int a[5]={1,2,3,4,5}, b[5];Map(a, a +5, b, cube);for(auto it : b)
cout << it <<" ";}